I was backed into this, please help so I can get it overwith! I have a column named history on a table named users on a MySQL database. The records under the history column have a string of nunbers with one space between them: 34 53 3535 98 324 324 etc. each one is different. I need to be able to search each record somehow, probably using LIKE, and say 'find every record that has the exact number 98 in the string located in the history column' The number 98 will change of course, and shoudl be a variable. Also, 59 87 or 983 or 198 is not specific enough. I have tried this:
$result = mysql_query("SELECT country FROM users WHERE history LIKE "^ 54 $", $link);
while ($row = mysql_fetch_array($result))
{
print $row["country"];
}
I don't know where to turn. This doens't work at all. Please help, I'd really appreciate it.