note 78783 rejected from function.mysqli-fetch-assoc by nlopess

From: Date: Sun, 28 Oct 2007 14:00:20 +0000
Subject: note 78783 rejected from function.mysqli-fetch-assoc by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-131789@lists.php.net to get a copy of this message
Note Submitter: mahafarah83 at hotmail dot com ---- i have this problem: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, and this is my code: <?php //connect to database server and select a database called cars $conn = mysql_connect("localhost", "root", ""); mysql_select_db("cars",$conn); $query= "select * from cartable where name like '%".$search."%'"; $result=mysql_query($query); while($record=mysqli_fetch_assoc($result)){ while(list($name,$value)=each($record)){ echo $name.$value; } echo "</br>"; } ?> am using WAMP

« previous php.notes (#131789) next »