Is there an ID or date field? You need one of the and simply sort by that field. SELECT fields FROM my_table ORDER BY date_column DESC LIMIT 3; or... SELECT fields FROM my_table ORDER BY id_column DESC LIMIT 3;
I have one more question... I have two tables contains same id fields. I want to delete a record from both tables in single query. Is there any option in phpmyadmin to relate these two tables? or i have to write query? whatever be solution please PM.
doing it with query is good option for you. what are two tables from which you have to delete entries together? share table structure and we can write query for you..
table 1 name = members fields: id,f_name,l_name,location table 2 name = paidmem fields: id,services,p_option Both tables have id field common
following query will do the needful.. "DELETE members, paidmem FROM members, paidmem WHERE members.id = '$id' AND paidmem.id = '$id'"; Code (markup):