同样的代码,放在不同的机子上运行,一台计算机显示正常,另一台运行时,页面报这样的错
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and t1.modelid = t2.id and t2.isvalid = 1' at line 5
select t2.modelname, t2.url from shutcuts as t1 inner join models as t2 on t1.userid = and t1.modelid = t2.id and t2.isvalid = 1
这是为什么啊?
select t2.modelname, t2.url from shutcuts as t1 inner join models as t2 on t1.userid = and t1.modelid = t2.id and t2.isvalid = 1
你的SQL有错
再者, 两台机器连的是不是同个数据库,数据表结构是不是一样的?