I've got a weird problem with a SQL Query.
The following Query works:
SELECT * FROM dbtable WHERE $search_list LIKE '%$search_str%' ORDER BY update_date DESC
$search_list is a column
$search_str is an entry in the column
But if I want to extend the Query as follows:
SELECT * FROM dbtable WHERE $search_list LIKE '%$search_str%' AND $search_list2 LIKE '%$search_str2% ORDER BY update_date DESC
Adding a second criteria using AND gives me a Syntax error in string in query expression.
What do I have to change in order to perform such a search?
Patrick.
The following Query works:
SELECT * FROM dbtable WHERE $search_list LIKE '%$search_str%' ORDER BY update_date DESC
$search_list is a column
$search_str is an entry in the column
But if I want to extend the Query as follows:
SELECT * FROM dbtable WHERE $search_list LIKE '%$search_str%' AND $search_list2 LIKE '%$search_str2% ORDER BY update_date DESC
Adding a second criteria using AND gives me a Syntax error in string in query expression.
What do I have to change in order to perform such a search?
Patrick.