electronish Posted December 22, 2006 Share Posted December 22, 2006 I want to get the last "created" value from the table row which has student id 7646 and class 03 this aint working .. !! [code]$query = "SELECT max(created) FROM `file_transactions` WHERE student_roll = '7646' and class = '03'";[/code] Link to comment https://forums.phpfreaks.com/topic/31626-selecting-last-updated-value-from-database/ Share on other sites More sharing options...
Orio Posted December 22, 2006 Share Posted December 22, 2006 Try:[code]SELECT created FROM `file_transactions` WHERE student_roll = '7646' and class = '03' ORDER BY created DESC LIMIT 1[/code]Orio. Link to comment https://forums.phpfreaks.com/topic/31626-selecting-last-updated-value-from-database/#findComment-146588 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.