Jump to content

Help with SELECT criteria


R0CKY

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/151455-help-with-select-criteria/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.