Dear sir, I need some coding help. I am doing a project using PHP and PSQL. In this module i have 3 categories and data stored in the respective categories. There are sub categories to each one of them. In my view page i want one one data or one record to be displayed from each of the categories irrespective of the subcategory. And it should be the the last data added to the site. Could you please help with this. and guide me accordingly. thanks.. shrisha
Databases don't remember which record was added last. You will have to store some information about when the record was added, like a timestamp. Then you can sort the records by that timestamp, and fetch the record with the newest timestamp.