0
Please go through the desc and suggest how can i make it
msg-no num message 1 82748 msg1 2 82748. msg2 1 98046 msg....... 3 82748 msg3 2 98046 msg....... I have a table with a combined primary key(col1,col2). Col1 auto increment. when we delete each row having '82748' in 'num' column and then insert another row what will the value of 1st column(msg_no) be? p.s - I want to make it recount for any specific 'num' when it's re-inserted
5 Answers
+ 2
Count of messages sent from a specific number? You could just count the rows that have the number.
Because if you delete all of them the next msg-no will still be 4
SELECT * FROM messages WHERE num="82748"
$executed->rowCount() //Amount of rows found 3
0
Why combined primary key?
0
I want to store messages as well as message count for a particular number.
and delete the record after retrieving
0
I want to store msg for a particular number in my server db. when the recipient retrieves the messages, those should be removed from server db and make auto-count 0 for the number
0
is it possible!