Tuesday, April 17, 2007

Here's the PHP code for mysqli

This works:

if ($db = @mysqli_connect('sql4.phpnet.us', 'pn_461233',
'student1')) {
mysqli_select_db($db, 'pn_461233_test');
$result = mysqli_query($db, 'SELECT * FROM
table1');
while ($row = mysqli_fetch_object($result)) {
printf(
htmlspecialchars($row->name)
);
}
mysqli_close($db);
} else {
echo "Connection failed";
}

Google (meaning you) are your best teacher. Don't wait for me to find mysqli connection strings. Oh well.

No comments: