I am trying to write an sql statement to get data from my Access database
through ODBC. Everything works okay if I write a simple Select statement,
but I need to write a statement like:
"SELECT Files.Fileame, Products.ProdName FROM Products INNER JOIN Files ON
Products.bid = Files.bid WHERE Products.ProdName LIKE '" . $ProdVar . "'";
I need the WHERE statement to use LIKE and wrap the variable $ProdVar in * so users can do a text search on the field.
This is where things get nasty. I have tried every combination of * "" .
LIKE etc and get no records returned or an ODBC driver error saying
that there were "too few parameters. Expecting 1."
If anyone has a clue on how to write this statement, what is wrong with the
above, what can be fixed, changed, etc in php to make it work ... I would
really appreciate a hand.