i created a user defined sql query that doesn't work. users are supposed to be able to enter search strings in an input field, submit then see the results of their search but everytime i enter a search for something that i know is in the database i get the unknown column "x" in "where clause" error message.
would you please help me fix the problem? here's the code that i wrote for it...
...
mysql_select_db("mydb", $c);
$search = $_POST['search'];
$rslt = mysql_query("SELECT * FROM mytable
WHERE 'mycolumn' RLIKE $search");
while($row = mysql_fetch_array($rslt))
{
echo $row['myrow'];
echo "<br />";
}
if (!$row)
{
die('uh oh: ' . mysql_error());
}
?>