Sisqo0 Posted August 6, 2020 Share Posted August 6, 2020 i got from debugscript 3 :- dbPoll failed, near "WHERE":syntax error local grp_db = dbConnect("sqlite",":Chats/Groups/groups.db") dbQuery(getinfo,grp_db,"SELECT name FROM groups WHERE groupName = ? AND WHERE rank = ?","Sisqo","Owner") function getinfo(q) if (q) then local p = dbPoll(q,-1) if (#p > 0) then for _,d in pairs(p) do outputChatBox(tostring(d["name"])) end end end end if i removed the second "WHERE" and "AND" , it would work so the question is "How to put 'WHERE' twice?" Link to comment
Moderators IIYAMA Posted August 6, 2020 Moderators Share Posted August 6, 2020 16 minutes ago, Sisqo0 said: it would work so the question is "How to put 'WHERE' twice?" You can only use WHERE once. After that you have the operators: AND, OR and NOT at your disposal. See these examples: https://www.w3schools.com/sql/sql_and_or.asp 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now