HOME > PHP > PHP Forum > ใช้ PHP connect Ms SQL Server 2000 ทำไม group by ไม่ได้.. Warning: mssql_query(): message: Column 'Daily.Daily_Date' is invalid in the select list because it
ใช้ PHP connect Ms SQL Server 2000 ทำไม group by ไม่ได้.. Warning: mssql_query(): message: Column 'Daily.Daily_Date' is invalid in the select list because it
<?
include("connect.php") ;
$strSQL = "SELECT * FROM Daily GROUP BY Patient";
$objQuery = mssql_query($strSQL) or die ("Error Query [".$strSQL."]");
while($objResult = mssql_fetch_array($objQuery))
{
print ("<a href=main.php?Patient=$objResult[Patient]>$objResult[Patient]</a><br>");
}
?>
error แบบนี้ค่ะ
Code
Warning: mssql_query(): message: Column 'Daily.Daily_Date' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. (severity 16) in d:\appserv\www\daily\left.php on line 38