Hey Everybody,
My name is Henry, I'm working on a program that uses mysql, and what I'm trying to do is do a query inside php
$result = mysql_query("SELECT * FROM keyTable WHERE
keyword = $tok"
$tok being a variable that contains a token from a long string like
("earth fire wind",
and I would like to be able to search for each of the words from the string one at a time.
Trouble being mysql doesn't take in variables when the run a WHERE clause in select, it has to be an actual string in double quotes like "i_am_a_string".
is there anyway that I can get around this?
would appreciate it.
Henry
My name is Henry, I'm working on a program that uses mysql, and what I'm trying to do is do a query inside php
$result = mysql_query("SELECT * FROM keyTable WHERE
keyword = $tok"
$tok being a variable that contains a token from a long string like
("earth fire wind",
and I would like to be able to search for each of the words from the string one at a time.
Trouble being mysql doesn't take in variables when the run a WHERE clause in select, it has to be an actual string in double quotes like "i_am_a_string".
is there anyway that I can get around this?
would appreciate it.
Henry