Hi all, 

I really don't know where else to post with this problem. I am using a PHP5
application, which uses the Sqlite2 built-in (2.8.16), and am using queries
via 

Class: PDO for PHP 4 
http://www.phpclasses.org/browse/package/2572.html

which simply call sqlite_fetch_array or sqlite_query.. Initially, all seemed
good, but now, I am noticing the following things. Say I have a database
file which has some data which behaves OK. I do an update on the server.
Then I reload/refresh the page. Randomly upon subsequent refreshes of the
page, sometimes the updated data is shown - and sometimes the data from the
previous, 'stable' state. 

Now, I download this sqlite file, and open it with SQLite Database Browser
(SDB), and I make a null edit in a field (i.e. open a field, press Space,
and press delete - so no changes are made, but the software still recognizes
a change and allows for saving) and then save the database file. If I now
upload to the server and overwrite the previous database, now this state
becomes the 'stable' one, and subsequent updates and page refreshes start
behaving randomly ??!!

Even worse is this: when after a refresh I get a non-updated state, and I
download the database, it does not show the updated data (in SDB). I hit
refresh in my browser a couple of times until I get the updated data, and I
download the same database file again - now the updated data is shown in
SDB??

But the worst must be, that when I delete the database file from the server
altogether, the php webpage sometimes *still* shows data from the last
'stable' state ???!!! (and sometimes it is empty, as expected).. 

I tried to read around, but cannot find the exact same problem - does anyone
have any idea why this is happening and how to fix it (note I have no
control over the server, and so I'm forced to use the built-in sqlite there)
?? I tried to put in something like:

$result = Db_query('PRAGMA synchronous = FULL'); print_r($result);

at the start of my php page - the return value is '1', but that doesn't seem
to help much.. 

Any suggestions will be greatly appreciated !!

Thanks in advance... 



-- 
View this message in context: 
http://www.nabble.com/PHP-Sqlite2---random-update-returns..-caching-problem--tp23235937p23235937.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to