R0CKY Posted March 27, 2009 Share Posted March 27, 2009 I have a line of code that selects from the dbase ordered by the date of the entry, like this : $result = $db->GetArray("SELECT * FROM ".$dbPrefix."files ORDER BY file_time DESC"); I would like to exclude from that result though when a specific field (ID) is a specific value (40) So in plain English it would be "select from the dbase ordered by time, excluding all files where the ID = 40. How would I alter the above code to achieve this? Many thanks! Quote Link to comment Share on other sites More sharing options...
MadnessRed Posted March 27, 2009 Share Posted March 27, 2009 $result = $db->GetArray("SELECT * FROM ".$dbPrefix."files WHERE `id` <> 40 ORDER BY file_time DESC"); Quote Link to comment Share on other sites More sharing options...
R0CKY Posted March 27, 2009 Author Share Posted March 27, 2009 Thank you. 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.