I get my select statements to work fine when looking up a number in a table, but when i get it to look for text such as "carpet" it will not give the right result. My code for this is shown below.
<?php
$db = mysql_select_db("mitch",$connection)
or die ("Couldn't select database");
$query = "SELECT * FROM product WHERE surface=carpet";
$result = mysql_query($query)
or die ("Couldn't execute query");
while($row = mysql_fetch_array($result,MYSQL_BOTH))
{
echo $row['product'];
}
?>
I've tried "carpet" and "carpet"" but still neither work.
Any Ideas please?