Sorry, this is a bit noobish, I cant get a simple while statement to execute while the condition is true and false if no results:
// Select all the rows in the markers table
$query = "SELECT * FROM markers M, professor P
WHERE P.id = M.id;";
if($row = mysql_fetch_array($result)) {
do {
echo $row;
}
while($row = mysql_fetch_array($result));
} else {
die('No results.');
}
The problem I see with this code is $query is never being called in the mysql_fetch_array() should this be changed?
PHP
whilestatements don’t haveelses. I believe that’s nearly unique to Python. Instead, you can do this: