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.

http://php.binerorockar.se/

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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -