Jump to content

Database query


Drakath

Recommended Posts

I get this error: Database query failed: no such column: Drakath

  
local sql = { Query = executeSQLQuery }; 
sql.Query( "INSERT INTO myTable ( name, ID, city ) VALUES ( "..getAccountName(getPlayerAccount(source))..", "..ID..", "..city.." )" ); 

How come it recognizes a value as a column?

Link to comment
There is no such column. "Drakath" is supposed to be the value and "name" is the column.

add table

executeSQLQuery("CREATE TABLE IF NOT EXISTS myTable (name TEXT, ID TINYTEXT, city TEXT)") 

executeSQLQuery( "INSERT INTO myTable (name,ID,city ) VALUES (?,?,?) ",getAccountName(getPlayerAccount(source)),ID,city) 

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