August 15th, 1999, 11:51 PM
I am trying to make a PHP search query into a mySQL database.
I used $query="select * from table where (
item LINK %$searchitem%)";
here $searchitem is an variable with the keyword value.
It was working with out the where clause.. can some one help.
August 16th, 1999, 12:21 AM
Just watch your syntax - I see a number of errors in what you typed (both in the message text and in its subject).
Assuming you're working with alphanumeric data, format your search as follows:
SELECT * FROM table WHERE item LIKE '%$searchitem%'
August 16th, 1999, 12:49 AM
I retyped the script and tried again still not working. I am not sure I am passing the query string properly
This is what my query string looks like
$query = "SELECT * FROM table WHERE (productcode LIKE '%$keywork%')";
I am still not getting, I am not sure what i am missing. It works I I remove the WHERE clause.
Any help is appreciated.
August 16th, 1999, 12:58 AM
It is working, I found a small problem with my column name in the mySQL table.
Thanks for the help.,