时间:2021-07-01 10:21:17 帮助过:18人阅读
$EarlyTime=mysql_result(mysql_query("select min(Time) from user where General=1 and UserID='".$row['DatID']."'",$conn),0);$LatestTime=mysql_result(mysql_query("select max(Time) from user where General=1 and UserID='".$row['DatID']."'",$conn),0);
在 Time、General、UserID 上都有索引吗?
两句应该合在一起写
list($EarlyTime, $LatestTime) = mysql_fetch_row(mysql_query("select min(Time), max(Time) from user where General=1 and UserID='".$row['DatID']."'"));
无以言表啊!楼上你收下我的掌声吧!
太感谢了!一下子优化了近一半!
膜拜啊。。大神!~