I tried this but php5 or mysql doesn't like the while clause using the fetch_assoc():
<?php
$mysqli = new mysqli('localhost',"consult_test", "password");
$mysqli->select_db("consult_bookmarks");
$result = $mysqli->query("SELECT * FROM users");
while($row = $result->fetch_assoc()) {
print $row['username'] . ' ' . $row['passwd'].' ' . $row['email']. '<br/>';
}
$result->close();
?>
The error message is:
Fatal error: Call to a member function fetch_assoc() on a non-object in
What do I need to do to generate a print out of the select results?