Here\'s the story:
I need to look up entries from a table that fulfil the following criteria:
[quote]banner=\\\"top\\\" [\\\"banner\\\" field is set(\'top\',\'bottom\')]
start<=date(\'U\') [\\\"start\\\" field is a unix timestamp]
end>=date(\'U\') [\\\"end\\\" field is a unix timestamp][/quote]
However, the following query does not seem to work:
[quote]\"SELECT * FROM table WHERE banner=\'top\' AND start<=\'$datenow\' AND end>=\'$datenow\'\"
where $datenow=date(\'U\'). If I remove the second AND clause, it works OK. The question is: how do I look up entries in my table that fulfil the above 3 criteria?
Any help would be highly appreciated.
Searching a mySQL table using multiple criteria
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users