开发者

ColdFusion Query Of query

开发者 https://www.devze.com 2023-02-14 10:29 出处:网络
This query: SELECT * FROM getlogs WHERE id > #id# AND logType = \"login\" LIMIT 1 Gives me this error:

This query:

SELECT * FROM getlogs WHERE id > #id# AND logType = "login" LIMIT 1

Gives me this error:

Error Executing Database Query.


Query Of Queries syntax error.
Encountered "logType. Incorrect conditional expression, Incorrect conditional expression, Lexical er开发者_如何学运维ror at line 0, column 0. Encountered: "\"" (34), after : ""


Use max rows:

< cfquery dbType="query" name"myQ" maxrows="1">
SELECT * FROM getlogs WHERE id > #id# AND logType = "login"
< /cfquery>


Use single quotes instead of double quotes.

0

精彩评论

暂无评论...
验证码 换一张
取 消