gpt4 book ai didi

mysql - #1064 - 您的 SQL 语法有误;查看与您的 MySQL 对应的手册

转载 作者:太空宇宙 更新时间:2023-11-03 10:52:54 26 4
gpt4 key购买 nike

#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 '-sporocilo us, uporabnik u WHERE ( 's%' LIKE
u.uuser) AND (s.SID = us.SID) AND (' at line 2

这是我得到的错误...

SQL:

SELECT us.ussender, s.ssubject, s.scontent, us.ustimesend, us.usstatus,
FROM sporocilo s, uporabnik-sporocilo us , uporabnik u
WHERE ($user LIKE u.uuser) AND (s.SID = us.SID) AND (us.usreciever LIKE u.uuser),
ORDER BY us.ustimesend ASC;

数据库:http://my.jetscreenshot.com/20224/20140415-ls6n-41kb

最佳答案

如果您的列标识符将包含破折号,您必须将它们用刻度线括起来。否则 MySQL 假定您正在执行减法运算。

SELECT us.ussender, s.ssubject, s.scontent, us.ustimesend, us.usstatus, 
FROM sporocilo s, `uporabnik-sporocilo` us , uporabnik u
WHERE ($user LIKE u.uuser) AND (s.SID = us.SID) AND (us.usreciever LIKE u.uuser),
ORDER BY us.ustimesend ASC;

关于mysql - #1064 - 您的 SQL 语法有误;查看与您的 MySQL 对应的手册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23088090/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com