 |
|
Error code mssql
Warning: mssql_query() [function.mssql-query]: message: Column 'tb_gps_total.gps_imei' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. (severity 16) in C:\AppServ\www\user1\gps\data_car_total.php on line 15
Warning: mssql_query() [function.mssql-query]: Query failed in C:\AppServ\www\user1\gps\data_car_total.php on line 15
Warning: mssql_num_rows() expects parameter 1 to be resource, boolean given in C:\AppServ\www\user1\gps\data_car_total.php on line 16
Code (PHP)
$s_select_car = "SELECT total.gps_lat, total.gps_lng, total.gps_imei, total.gps_time_send, u.login_username ,u.drive_code,u.imei FROM tb_gps_user AS u,tb_gps_total AS total WHERE u.imei=total.gps_imei GROUP BY total.gps_lat, total.gps_lng ";
$r_select_car = mssql_query($s_select_car);
$check_data = mssql_num_rows($r_select_car);
พอใช้ GROUP BY แล้วขึ้น error ดังกล่าวทันที ไม่ทราบว่าเกิดจากสาเหตุอะไรหรือครับ
ยังไงรบกวนผู้รู้แนะนำทีครับ
ขอบคุณครับ
Tag : PHP, Ms SQL Server 2005, HTML/CSS, JavaScript, Ajax, Windows
|
|
 |
 |
 |
 |
Date :
2014-03-29 12:50:27 |
By :
systemanalysis |
View :
5364 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |