此查询:
SELECT * FROM getlogs WHERE id > #id# AND logType = "login" LIMIT 1
给我这个错误:
Error Executing Database Query.
Query Of Queries syntax error.
Encountered "logType. Incorrect conditional expression, Incorrect conditional expression, Lexical error at line 0, column 0. Encountered: "\"" (34), after : ""
答案 0 :(得分:7)
使用最大行:
< cfquery dbType =“query”name“myQ”maxrows =“1”>
SELECT * FROM getlogs WHERE id> #id#AND logType =“login”
< / CFQUERY>
答案 1 :(得分:3)
使用单引号而不是双引号。