Changes

Jump to: navigation, search

PHP and SQLite

28 bytes added, 20:13, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0"> " to "<table border="0" cellspacing="0" width="100%">"
<table border="0" cellspacing="0" width="100%"><tr>
<td width="20%">[[Using PHP with MySQL|Previous]]<td align="center">[[PHP Essentials|Table of Contents]]<td width="20%" align="right"></td>
<tr>Using PHP with MySQL</td>
<googlehtmlet>BUY_PHPphp</googlehtmlet>
== Creating an SQLite Database with PHP ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>An SQLite database can be opened or created using the PHP ''sqlite_open()'' function. This function accepts one mandatory and two optional arguments. The first argument is the database name (which, by convention, is given a .sqlite file extension). The second argument specifies option optional UNIX file permission settings. The final argument represents an error message to display if the file cannot be opened.
The ''sqlite_open()'' function returns a database handle on success, or a boolean ''false'' value on failure. A memory resident database can be created by passing in the string '':memory'' as the database file name argument.
SQLite databases are closed using the ''sqlite_close()'' function.
This chapter has provided an overview of working with PHP and SQLite.
 
<htmlet>php</htmlet>

Navigation menu