[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

php and sqlite



I seem to be stuck (slightly) with converting an some postgres and mysql based php web applications to sqlite.

There seems to be two possible interfaces to the database SQLite3 and PDO

I have discovered that SQLite3 seems to set the busy timeout to 0 - meaning that if there is any other activity (from another web thread) on the database there is a strong chance of a lock failure. There doesn't seem to be way to change the value.

PDO, on the other hand seems to have this set at 60 seconds, and it is possible to change it, but doesn't seems to support the "reset" function to return a cursor to the begining of a rowset during a query.

Is there anyone more expert than me on this who can tell me whether I can either (a) get round the SQLite3 problem, or (b) get round the PDO problem.

I am going with PDO at the moment, because the reset problem is minor but it would be nice to know if I could solve the issue.

(I would also be interested to know if the PDO::beginTransaction and the equivalent PDO::commit and PDO:rollBack do anything different that just including a query with the sql commands in them).

--
Alan Chandler
http://www.chandlerfamily.org.uk


Reply to: