开发者

When sqlite_* functions will be updated to use SQLite ver. 3

When Rasmus Lerdorf will update sqlite_* functions here: http://php.net/manual/en/book.sqlite.php to use SQLite version 3?

I know I can use PDO. I want to use the native functions since they are faster. And no, I don't want database abstraction.

I'm using PHP 5.3 and the database that was created using SQLite 2.8.17. Here's my code:

if ($db = sqlite_open('whatever', 0666, $开发者_开发百科sqliteerror)){ 
    sqlite_query($db, 'CREATE TABLE foo (bar varchar(10))');
    sqlite_query($db, "INSERT INTO foo VALUES ('fnord')");
    $result = sqlite_query($db, 'select bar from foo');
    var_dump(sqlite_fetch_array($result)); 
} else {
    die($sqliteerror);
}

Any idea?

Thanks.


PHP has a separate SQLite3 extension. It's right below the original SQLite extension in the manual menu in case you didn't notice.

The original SQLite extension is probably still there for backward compatibility.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜