PHP SQLite support

SQLite

pdo_sqlite support PHP Portable Data Object ( PDO ) has a driver for SQLite database as pdo_sqlite. We can check the support for the driver by using phpinfo().
Use phpinfo() to get PHP installation details, code is here
<?Php

echo phpinfo();
?>

pdo_sqlite

Part of the output is shown here with PDO SQLite support.

To check for different database PDO driver support we can use this code.
var_dump(PDO::getAvailableDrivers());

If SQLite dirver support is missing then follow the instructions at php.ini here to enable the support. ( restart if php.ini is changed )

sqlite3 support

Check phpinfo() to know about sqlite3 library support.
sqlite3 library support
Update or enable sqlite3 library support in your php.ini file.

Enable php_sqlite3.dll inside your php.ini file.

sqlite3 enable at php.ini file

Version details of sqlite3 library
$ver_dtl = SQLite3::version();

echo $ver_dtl['versionString'] . "<br>";
echo $ver_dtl['versionNumber'] . "<br>";

var_dump($ver_dtl);
Output is here ( may change based on your installation )
3.8.10.2
3008010
array(2) { ["versionString"]=> string(8) "3.8.10.2" ["versionNumber"]=> int(3008010) }
Download sample script for SQLite with instructions on how to use.

Connection to SQLite and create table

PHP SQLite PDO Functions


plus2net.com







Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer