$result = mysql_query("SELECT * FROM Users") or die("could not select ".mysql_error());
if (!$result) {
echo 'Could not run query: ' . mysql_error();
}
$rows = mysql_num_rows($result) or die("no rows" . mysql_error());
if ($rows > 0) {
$row = mysql_fetch_assoc($result);
while ($row = mysql_fetch_assoc($result)) {
print_r($row);
}
Every time I run this, I get the error "no rows" from the die statement, but I tested the sql and it runs correctly. The num rows is not working.