Here is the way I normally use Mysqli
$mysqli = new mysqli($myServer, $myUser, $myPass, $myDB);
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit;
}
$result = $mysqli->query($query);
while ($row=$result->fetch_assoc()) {
print_r($row);
}
Note: mysqli is a class, $mysqli is the variable that holds the instance of that class, query is a method of that class that returns a result class that has methods of its own.
MindStalker
2010-02-25 16:25:45