On 15 Nov 2012, at 11:35pm, TR Shaw <ts...@oitc.com> wrote: > Process 2: > > $sql = "SELECT value FROM key_value WHERE key=='updated'"; > $result = $db_conn->query($sql); > $row = $result->fetch(); > $result->closeCursor(); > if (empty($row)) $updated_time = 0; > > never receives a value
I think you're mixing two models of PDO calling. Can you rewrite your code to look a little closer to the example on <http://www.php.net/manual/en/pdostatement.closecursor.php> ? You should be calling ->closeCursor() on a statement, not on the result of a query. > $sigs_created = time(); > $sql = "INSERT OR REPLACE INTO key_value (key, value) VALUES ('sigs_created', > $sigs_created)"; > $result = $db_conn->exec($sql); > > aborts with: SQLSTATE[HY000]: General error: 5 database is locked code:HY000 If you call this without doing the initial stuff with the query and fetch, does it work ? Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users