Jump to content

[SQLite] Syntax error


Recommended Posts

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

if i removed the second "WHERE" and "AND" , it would work so the question is "How to put 'WHERE' twice?"

Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...