Hello
I have a table with 4 fields like
table name=profile
name,address,category,date
the category column have 7 different value and i am required to fetch the most recent entry in each category
THANK YOU IN ADVANCE
retrive data from mysql using date as search option
Moderator: General Moderators
Re: retrive data from mysql using date as search option
Are you saying there are up to seven rows in the table all with the same "category"? Or that the "category" has seven values in it (perhaps separated by commas)?
Re: retrive data from mysql using date as search option
Try this query
SELECT * FROM `profile` group by category order by date desc
SELECT * FROM `profile` group by category order by date desc
Re: retrive data from mysql using date as search option
CAtegory have seven values and i need to retrive data from each category which is the most recent one
Re: retrive data from mysql using date as search option
THANK YOU pbs, your query has solved my problem.THANKS ONCE AGAIN