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) "; Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.