Hi,
I'm having trouble with a SELECT statement using the LIKE operator.
It's a small search engine that looks for a word in a books database. My query is like that :
SELECT * FROM books WHERE title LIKE '*$word*';
where $word is entered in a web form.
The SQL query is well done (copy/paste to Access and then execute under Access gives me the right result) but when executed in my PHP script it always returns no data.
I tried many things (parenthesis, double quotes, no wilcards, and so on) without any success.
I use PHP 4.0.6 and Access 97 with ODBC driver.
Can someone give me a tip ?
Regards
Fabrice.
I'm having trouble with a SELECT statement using the LIKE operator.
It's a small search engine that looks for a word in a books database. My query is like that :
SELECT * FROM books WHERE title LIKE '*$word*';
where $word is entered in a web form.
The SQL query is well done (copy/paste to Access and then execute under Access gives me the right result) but when executed in my PHP script it always returns no data.
I tried many things (parenthesis, double quotes, no wilcards, and so on) without any success.
I use PHP 4.0.6 and Access 97 with ODBC driver.
Can someone give me a tip ?
Regards
Fabrice.