Guest elthomo Posted March 14, 2008 Share Posted March 14, 2008 Could someone please let me know why my code is not pulling the latest timestamp??? please! $queryb = "SELECT * FROM adresgegevens WHERE ($dossiernummer = adresgegevens.dossiernummer) having MAX(timestamp) "; Link to comment https://forums.phpfreaks.com/topic/96138-timestamp/ Share on other sites More sharing options...
craygo Posted March 14, 2008 Share Posted March 14, 2008 Having is usually used with group sql statements. You also need to put your field first in the where portion also no real need to use max $queryb = "SELECT * FROM `adresgegevens` WHERE `dissiernummer` = '$dossiernummer' ORDER BY `timestamp` DESC LIMIT 1"; that should give you the latest one Ray Link to comment https://forums.phpfreaks.com/topic/96138-timestamp/#findComment-492172 Share on other sites More sharing options...
Guest elthomo Posted March 14, 2008 Share Posted March 14, 2008 Perfect thank you ever so much. SOLVED Link to comment https://forums.phpfreaks.com/topic/96138-timestamp/#findComment-492177 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.