mardi 9 juin 2015

Error when using LIMIT and OFFSET on a Sqlite Query

I'm using the following query:

[NSString stringWithFormat: @"DELETE FROM CarrelloMese LIMIT -1 OFFSET %d",indexPath.row];

But using the method:

NSLog(@"ERRORE: %s", sqlite3_errmsg(MyDB));

on the console I see that there's an error, the error reported is this: near "LIMIT": syntax error

What's wrong about that query?

Aucun commentaire:

Enregistrer un commentaire