Re[2]: [sqlite] PHP 5.0.2 / Win sqlite_query problem

2004-10-21 Thread Radek Hulán
>> When I try to execute the same query using sqlitecc.exe it works just fine. >> DRH> This fact suggests that the problem is in PHP or the application program, DRH> not in SQLite. There can hardly be any problem with sqlite_query($db,$query) application code... Is SQLite in PHP 5.0.2 supposed

Re: [sqlite] PHP 5.0.2 / Win sqlite_query problem

2004-10-21 Thread D. Richard Hipp
Radek Hulán wrote: When I try to execute the same query using sqlitecc.exe it works just fine. This fact suggests that the problem is in PHP or the application program, not in SQLite. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

[sqlite] PHP 5.0.2 / Win sqlite_query problem

2004-10-21 Thread Radek Hulán
I am trying to migrate my opensource project (http://blogcms.com/) from MySQL 4.0 (mysql) and MySQL 4.1 (mysqli) to SQLite as well. Seems pretty easy with DB layer, but... when I open DB via sqlite_open() and execute few CREATE TABLE queries, via sqlite_query(), the connection is dropped and I

[sqlite] Table locked when trying to delete a record whilst a cursor to the table is open

2004-10-21 Thread Andrew Clark
Hi, Sorry I forgot to say.. I do know that the error occurs because there are read locks on the table, but is there any reason why say a single process should not be able to modify the table anyway? Or is there something in the Cursor enumeration code that would not be happy if a record

[sqlite] Table locked when trying to delete a record whilst a cursor to the table is open

2004-10-21 Thread Andrew Clark
Hi, First of all here the simple example of what i am doing would be: "SELECT id FROM test" Get first Result DELETE FROM test WHERE id=xxx Close Cursor - When i call the DELETE command I get an error of TABLE LOCKED which for those that

Re: [sqlite] Parameterized queries -- howto?

2004-10-21 Thread Ron Aaron
On Thu, October 21, 2004 7:51, Clay Dowling said: > Ron, > > Take a look at the example application in the Linux Journal article > http://www.linuxjournal.com/article.php?sid=7803 > > The parameterized queries provide a much better solution than sprintf. > You can grab a complete working app from

Re: [sqlite] Busy handlers in SQLite3

2004-10-21 Thread Gerhard Haering
On Thu, Oct 21, 2004 at 04:36:16PM +0200, Guillaume Fougnies wrote: > Hi, > > This problem was evoked on the list. sqlite3_exec do not catch > SQLITE_BUSY on the sqlite3_step. I'm not even using sqlite3_exec, I was writing my own my_sqlite3_exec, because sqlite3_exec was not compatible with the

Re: [sqlite] Busy handlers in SQLite3

2004-10-21 Thread Guillaume Fougnies
Hi, This problem was evoked on the list. sqlite3_exec do not catch SQLITE_BUSY on the sqlite3_step. If you want to continue to use the sqlite3_exec properly with busy handler, you can copy and modify the method stored in src/legacy.c. I can send you my modified version if you need. It seems, to

[sqlite] Busy handlers in SQLite3

2004-10-21 Thread Gerhard Haering
Hi, I'm converting SQLite2 code to SQLite3. It looks to me like the sqlite3_busy_handler() and sqlite3_busy_timeout() don't do anything. At least not anything useful. At least not when using the new API with sqlite3_step() and friends. Is that true? Do I have to catch SQLITE_BUSY from the

Re: [sqlite] Parameterized queries -- howto?

2004-10-21 Thread Clay Dowling
Ron, Take a look at the example application in the Linux Journal article http://www.linuxjournal.com/article.php?sid=7803 The parameterized queries provide a much better solution than sprintf. You can grab a complete working app from the link at the end of the article. Clay Dowling Ron Aaron