Simple Power SQLite class: Class in PHP for easy SQLite operation.
Tested on PHP 4.3.3 (Win XP) - PHP5.0.0b2dev (Win XP).
void
SPSQLite
(string $file, [bool $persistent = false], [bool $showError = true], [bool $rememberType = true])
void
alterTable
(mixed $tableName, array $newDefinition, [array $sourceCols = null], [array $targetCols = null], string $tablename)
bool
$_buffer
= true (line 107)
Use or not use buffer/unbeffered result?
int
$_busyTimeout
= 30000 (line 160)
Milliseconds
array
$_colsType
= '' (line 180)
Array with cols name and type
string
$_command
= '' (line 87)
the SQL query
resource
$_conn
= null (line 67)
Resouce of SQLite connection
string
$_file
= '' (line 57)
The name of database
bool
$_openTransaction
= false (line 150)
The state of transaction
string
$_rememberType
= true (line 120)
Set behaviour (reset or not reset the type setting?)
If $_rememberType is true, it comes remembered between one call and the other of returnRow() and selectRow(), if it is false, $_type always comes set on 'both'
resource
$_result
= null (line 97)
The result resource
bool
$_showError
= false (line 77)
Show or not show the error message?
array
$_tableInfo
= '' (line 170)
Array with table information
array
$_transaction
= array() (line 140)
Array of query
string
$_type
= SQLITE_BOTH (line 130)
Type of array index (row)
string
$_version
= 'SPSQLite Class v 0.6' (line 47)
The class version
Constructor SPSQLite (line 198)
Set the properties $file, $persistent and $showMessage.
Connect to database.
addFunction (line 500)
This method expand the SQLite ability
The functions added with this method, can be used in the sql query. The functgion of PHP, they can be called with the sintax: php('functionName', param, param, ...)
addQuery (line 760)
Add a query to transaction
affectedRows (line 659)
Return how many lines are changed
alterTable (line 265)
Alter the structure of table
beginTransaction (line 696)
Start transaction process
classVersion (line 829)
The version of class
close (line 872)
Close a connection to database
commitTransaction (line 715)
Finish the transaction process
decodeBinary (line 460)
This method return decoded binary data
encodeBinary (line 428)
This method return encoded binary data
escapeString (line 781)
Prepare a string with special characters
getColsType (line 405)
This method return an array with columns name and type of the current table
getTableInfo (line 359)
This method return an array of table info or a specific info
lastInsertId (line 643)
Return the last insert id (column declared INTEGER PRIMARY KEY )
libEncoding (line 797)
The encoding of library
libVersion (line 813)
The version of library
numRows (line 675)
Return the number of rows
optimizeDatabase (line 477)
Optimize dimension of database with the SQLite statemant VACUUM
query (line 520)
Submit a SQL query to database
returnRows (line 552)
Get rows !!
selectRows (line 584)
Select a portion of rowset
setWaitingTime (line 226)
Set the waiting time to busy
turboMode (line 243)
Increase the performance of SQLite
_colsTypeCombine (line 945)
Accessory method
_createColsQuery (line 309)
This method create a fragment of query (process the array whith columns definition)
_filterName (line 888)
Accessory method
_filterTrim (line 928)
Accessory method
_filterType (line 908)
Accessory method
_rollbackTransaction (line 743)
If a query fails in a transaction, this method it takes part
_setColsType (line 381)
Set the array _colsType with columns information
_setTableInfo (line 338)
This method set _tableInfo
_setType (line 621)
This method set a type-index of the array rows
_showError (line 846)
Print the last error
Documention generated on Mon, 14 Jul 2003 14:38:56 +0200 by phpDocumentor 1.2.1