-4

下面的 sql 查询在 localhost 中工作,当我在 Web 服务器中尝试它时它不起作用。

SELECT  t1.student_id,t1.id AS id1,t2.id AS id2,t3.id AS id3,t1.costperhour AS cs1,t2.costperhour AS cs2,t3.costperhour AS cs3,t1.sub_hours AS th1,t2.sub_hours AS th2,t3.sub_hours AS th3,MIN(t1.subjectass_id) AS sub1,MIN(t2.subjectass_id) AS sub2,MIN(t3.subjectass_id) AS sub3    FROM    tb_adhocdetails t1
        LEFT JOIN tb_adhocdetails T2 
            ON t1.student_id = t2.student_id 
            AND t2.subjectass_id > t1.subjectass_id
        LEFT JOIN tb_adhocdetails T3 
            ON t2.student_id = t3.student_id
            AND t3.subjectass_id > t2.subjectass_id
        LEFT JOIN tb_adhocdetails T4 
            ON t3.student_id= t4.student_id
            AND t4.subjectass_id > t3.subjectass_id
WHERE t1.student_id=360
4

1 回答 1

0

在某些 Linux MySQL 服务器上,表/列名称区分大小写。当您使用大写“T”声明表并将它们与小写“t”一起使用时,您可能会遇到无法识别的表的错误

于 2013-04-18T15:43:01.350 回答