我对以下 php/sql 有疑问。我在 mysql 终端中运行了 sql,它运行良好。我还尝试了我的连接语句来提醒一个字符串,它在连接到数据库时成功地提醒了这个字符串。此代码中存在一些错误,当它应该返回两个整数时返回 null。有什么建议么?
$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>';