1

I'm having trouble with a query with sqlite. It keep giving me :

Warning: SQLiteDatabase::queryExec() [sqlitedatabase.queryexec]: near ",": syntax error in`

I dont 't understand because when i try my full query in phpMyAdmin it tells me it's alright but when I execut it with $database->queryExec($sql); it give me this error.

Here is the begenning of the query :

INSERT INTO videos (src,videoid,title_url,title) VALUES ('youtube','m7v9427AjpM','cestmoiladmin','Petit kiff personnel :p')

Any ideas ?

fmendez
  • 7,250
  • 5
  • 36
  • 35
Tom
  • 785
  • 10
  • 26
  • What do you mean this is the "beginning of the query"? Is there more? Can you post a little extra? – Ben Mar 23 '13 at 21:46
  • oops i've sent the message... And it goes for 50 insertions. It seems that the error is at the begenning. I tried [link](http://stackoverflow.com/questions/1609637/is-it-possible-to-insert-multiple-rows-at-a-time-in-an-sqlite-database) but could not make it work. – Tom Mar 23 '13 at 21:51
  • The simple answer @user is that you're using MySQL syntax in a SQLite database. see http://stackoverflow.com/questions/1609637/is-it-possible-to-insert-multiple-rows-at-a-time-in-an-sqlite-database – Ben Mar 23 '13 at 21:56
  • I know but i thought it had the same syntax. I guess with your message i'm wrong. – Tom Mar 23 '13 at 21:58
  • Ok it's all edited back to the exemple in the link. The problem I had was I have the error 'connection reinitialized' during the query. – Tom Mar 23 '13 at 22:07
  • I just notice it only does this when I have more that 28 UNION SELECT... Any idea ? – Tom Mar 23 '13 at 22:09
  • How long is the query string for 28 or 29 records? – CL. Mar 23 '13 at 22:14

0 Answers0