Jump to content

[BUG] What's wrong with this query


Recommended Posts

Hey guys, I get the following error:

 

"payphone\main.lua:23: dbPoll failed; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version and for the right syntax to use near 'WHERE Number = 906366 at line 1"

 

This is the code:

local checkNr = dbQuery(handler, "SELECT * FROM PayPhoneOW LIMIT 1 WHERE Number = ".. phonenumber)
			local result, num_affected_rows, last_insert_id = dbPoll ( checkNr, -1 )
			
			outputChatBox(tostring(num_affected_rows))

Fixed... LIMIT 1 was infront of WHERE... sorry....

Edited by Dutchman101
Fix topic title for section requirements
Link to comment

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...