Topic: Sqlite 3 / PHP PDO support
This feature request would give the option to use the PDO extensions in php and also allow usage of sqlite v3.
You are not logged in. Please login or register.
PunBB Forums → Feature requests → Sqlite 3 / PHP PDO support
This feature request would give the option to use the PDO extensions in php and also allow usage of sqlite v3.
Here is the list of databases that would possibly be useable with this.
18 PDO_DBLIB FreeTDS/Sybase/MSSQL driver for PDO
19 PDO_FIREBIRD Firebird/InterBase 6 driver for PDO
20 PDO_IDS PDO driver for IBM Informix IDS databases
21 PDO_MYSQL Mysql 3.x/4.0 driver for PDO
22 PDO_OCI Oracle Call Interface driver for PDO
23 PDO_ODBC ODBC v3 Interface driver for PDO
24 PDO_PGSQL PostgreSQL driver for PDO
25 PDO_SQLITE SQLite v3 Interface driver for PDO
PDO is only in php 5.1 isn't it ?
No. It is "integrated" with 5.1, with 5.0 it is a module from http://pecl.php.net
Direct link is : http://pecl.php.net/package-search.php? … mit=Search
PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data. PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.
PDO wouldn't add a lot to PunBB since PunBB already has an abstraction layer. The only advantage, except current support for sqlite3, would be that the functions used in the abstraction layer would be the same, but that doesn't help at all. The only potential use for PDO in PunBB would be prepared statements/parameters, but that's not something you do in an afternoon. To top things off, the support for PDO among hosting companies is minimal at best. We can expect that to be true for some time.
PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data. PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.
PDO wouldn't add a lot to PunBB since PunBB already has an abstraction layer. The only advantage, except current support for sqlite3, would be that the functions used in the abstraction layer would be the same, but that doesn't help at all. The only potential use for PDO in PunBB would be prepared statements/parameters, but that's not something you do in an afternoon. To top things off, the support for PDO among hosting companies is minimal at best. We can expect that to be true for some time.
Unfortunately I have to agree on hosting support for PDO. It has been very minimal that I've seen out there at best.
Tenkawa
PDO wouldn't add a lot to PunBB since PunBB already has an abstraction layer.
I'm not sure about this, but doesn't PDO actively convert queries from one SQL language to another e.g. you can use it to run mysql queries on firebird?
ConnorHd: Read the quote i posted earlier
PDO adds a unified function naming scheme and in some cases, allows for the use of prepared statements and SQL parameters. That's it.
well i didn't understand what any of that meant
SQLite 3.2.0+ support "ALTER TABLE",
and lots of Mod. can't install in current SQLite 2.x,
it will be nice if next version to support SQLite 3.2.0+
yeah.. I really need SQLite 3 support..
In Fact, I had a testing forum which used SQLite3 DB that convert from SQLite2.
I just know a little php, so wrote an example php to test SQLite3 DB:
<?
$db = sqlite3_open("punbb.db3");
$query = sqlite3_query($db, "SELECT poster,message FROM posts");
if (!$query) die (sqlite3_error($db));
while ( ($row = sqlite3_fetch_array($query)) )
{
echo $row['poster'], $row['message'];
echo "\n";
}
sqlite3_query_close($query);
sqlite3_close ($db);
?>
and it just work fine.
But PunBB just show a empty page when i try to change some code in include\dblayer\sqlite.php like this:
from
sqlite_xxx()
to
sqlite3_xxx()
I thought it should be easy for people that familiar with php convert to SQLite3.
In Fact, I had a testing forum which used SQLite3 DB that convert from SQLite2.
I just know a little php, so wrote an example php to test SQLite3 DB:<? $db = sqlite3_open("punbb.db3"); $query = sqlite3_query($db, "SELECT poster,message FROM posts"); if (!$query) die (sqlite3_error($db)); while ( ($row = sqlite3_fetch_array($query)) ) { echo $row['poster'], $row['message']; echo "\n"; } sqlite3_query_close($query); sqlite3_close ($db); ?>
and it just work fine.
But PunBB just show a empty page when i try to change some code in include\dblayer\sqlite.php like this:
from
sqlite_xxx()
to
sqlite3_xxx()I thought it should be easy for people that familiar with php convert to SQLite3.
the only way to acces sqlite3 is through PDO.
PunBB Forums → Feature requests → Sqlite 3 / PHP PDO support
Powered by PunBB, supported by Informer Technologies, Inc.