Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /Applications/XAMPP/xamppfiles/htdocs/lis 160 database/order.php on line 68
this is the php code im currently working on and I'm trying to print results from a the comment column, in the same row as the query entered in the search bar. Can anyone please help me find my error?
<?php
$connection = mysql_connect("localhost","root","") or die("Couldn't connect");
mysql_select_db("saver") or die("Could not open database");
$xquery = $_REQUEST['query'];
$result = mysql_query("SELECT comment * FROM shirt WHERE (name LIKE '$xquery') ");
while($row = mysql_fetch_array($result))
{
echo $row['comment'] ;
}
?>

New Topic/Question
Reply




MultiQuote








|