Please go through the desc and suggest how can i make it | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

4th Jul 2018, 5:56 PM
Arindam Mondal
Arindam Mondal - avatar
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
4th Jul 2018, 6:14 PM
Toni Isotalo
Toni Isotalo - avatar
0
Why combined primary key?
4th Jul 2018, 6:07 PM
Toni Isotalo
Toni Isotalo - avatar
0
I want to store messages as well as message count for a particular number. and delete the record after retrieving
4th Jul 2018, 6:11 PM
Arindam Mondal
Arindam Mondal - avatar
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
4th Jul 2018, 6:18 PM
Arindam Mondal
Arindam Mondal - avatar
0
is it possible!
4th Jul 2018, 6:18 PM
Arindam Mondal
Arindam Mondal - avatar