SQL Functions doesn't work

Thanks for response.

So no error is given to console.

However, database should start with function newSQLData().

It prints both options, so I think it’s up to the getSQLData( … ) function.

I don’t know what’s wrong with this function…

Greetings,

Bambenek

I’d recommend putting in some prints and see what’s going on.  Print the values you are passing in.  Print out the whole query string.  If you’re on a Mac, you can run sqlite from the command line and try the queries to make sure sqlite isn’t choking on something.

Rob

As Rob mentioned, you need to post more code so we can see how you’re calling your functions - or you’ll need to look at debugging the code more.

For example, what is actually being returned in your “row.data” object in getSQLData()? From the SQL structure, it looks like you’d actually be returning a lua table with three columns: user, audio, and score. Instead of returning row.data, why don’t you just return true and check for that instead?