SQLite problem
Posted: Sun Aug 08, 2004 4:57 pm
Hi, I'm getting this error
when I run the following code:
I see something in the PHP manial about the mode parameter to sqlite_open being ignored:
Any help regarding the read-only error problem GREATLY appreciated
Code: Select all
Warning: sqlite_query() їfunction.sqlite-query]: attempt to write a readonly database in /some/path/sqlite.class.php on line 42
create table failedCode: Select all
if($yada = new sqlite_db('/some/path/test.sqlite') == TRUE) {
$sql = "CREATE TABLE users (
id INTEGER PRIMARY KEY,
uname STRING UNIQUE,
passwd STRING,
email STRING,
active INTEGER)";
echo "trying to create table with ".$sql."";
if($yada->sqlite_query($sql) == FALSE) {
echo "create table failed";
} else {
echo "create table success";
}The mode parameter specifies the mode of the file and is intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value to use if you need access to the errmessage parameter.
Any help regarding the read-only error problem GREATLY appreciated