sqlite3 - Novice: Sqlite from php -
i new php , wish read data sqlite database.
i have got hello world work correctly following 2 scripts failed execute without error:
<?php echo sqlite_libversion(); ?> <?php print_r(sqlite3::version()); ?>
the first script gives error:
fatal error: call undefined function sqlite_libversion()
the server on have website has following php configuration.
where shows:
pdo_sqlite: pdo driver sqlite 3.x enabled
do have sqlite3 support? how can test support?
there several ways access sqlite php. in examples, using sqlite , sqlite3 extensions php. have neither of these extensions installed in php system.
you have sqlite driver pdo installed. generic api sqlite , other databases. syntax sqlite software version.
// connect in-memory sqlite database $db = new pdo("sqlite::memory"); echo $db->query("select sqlite_version()")->fetchcolumn();
to use sqlite specific api functions, need uncomment extension=sqlite.so
in php config file.
Comments
Post a Comment