I am having an issue with the following php/sql. I ran the sql in the mysql terminal and it worked perfectly. I also tried my connect statement alerting a string and it succesfully alert the string when connected to the db. There is some error within this code that is returning null when it should be returning two integers. Any suggestions?
$xmax = mysql_fetch_row(mysql_query('SELECT MAX(x) AS xmax FROM headerfooter WHERE site = "Brighter_Vista" AND location = 0'));
$xmax = $xmax['xmax'];
$ymax = mysql_fetch_row(mysql_query('SELECT MAX(y) AS ymax FROM headerfooter WHERE site = "Brighter_Vista" AND location = 0'));
$ymax = $ymax['ymax'];
echo '<script>alert("'.$xmax.$ymax.'")</script>';
print_r($xmax)after the mysql_fetch_row call to see what, if anything, is returned from the query.