Re: [PHP] PDO_SQLite Transactions

2007-07-29 Thread Nathan Nobbe
i had this same problem when trying to do a select directly after an insert w/ pdo + sqlite3 transactions. solution in that case was to use last_insert_id (or whatever the actual pdo method is called, cant remember and too lazy to lookup, atm :)) anyway if you want to do an update after an insert j

Re: [PHP] PDO_SQLite Transactions

2007-07-29 Thread M. Sokolewicz
I was indeed trying to update the record I just inserted, the thing is though, if I remove all other queries and keep just PDO->beginTransaction(); PDO->prepare(); PDOstatement->execute(); PDOstatement->closeCursor(); PDO->commit(); it still returns such an error. Which is very odd indeed... As

Re: [PHP] PDO_SQLite Transactions

2007-07-28 Thread Richard Lynch
I suspect that you are trying to update the record you just inserted. That may just not be possible in the transaction model, for whatever internal purposes. It also seems kind of backwards to me at least. Why not just do the file move and error checking before you even bother to insert, and the

[PHP] PDO_SQLite Transactions

2007-07-28 Thread M. Sokolewicz
I've been having this problem for a while now, when I use transactions in SQLite with PDO it stalls on me with an error stating my statements are in progress. I've tried closing all cursors to my statements, but that does not seem to resolve this for me. This is my code, (obviously shortened qu