| [ Index ] |
|
Code source de SPIP Agora 1.4 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 695 lignes (22 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
DB_sqlite:: (21 méthodes):
DB_sqlite()
connect()
disconnect()
simpleQuery()
nextResult()
fetchInto()
freeResult()
numCols()
numRows()
affectedRows()
errorNative()
errorCode()
dropSequence()
createSequence()
nextId()
getSpecialQuery()
getDbFileStats()
escapeSimple()
modifyLimitQuery()
_modifyQuery()
sqliteRaiseError()
| DB_sqlite() X-Ref |
| Constructor for this class. Error codes according to sqlite_exec. Error Codes specification is in the {@link http://sqlite.org/c_interface.html online manual}. This errorhandling based on sqlite_exec is not yet implemented. |
| connect($dsninfo, $persistent = false) X-Ref |
| Connect to a database represented by a file. param: $dsn the data source name; the file is taken as param: $persistent (optional) whether the connection should return: int DB_OK on success, a DB error on failure |
| disconnect() X-Ref |
| Log out and disconnect from the database. return: bool true on success, false if not connected. |
| simpleQuery($query) X-Ref |
| Send a query to SQLite and returns the results as a SQLite resource identifier. param: the SQL query return: mixed returns a valid SQLite result for successful SELECT |
| nextResult($result) X-Ref |
| Move the internal sqlite result pointer to the next available result. param: a valid sqlite result resource return: true if a result is available otherwise return false |
| fetchInto($result, &$arr, $fetchmode, $rownum=null) X-Ref |
| Fetch a row and insert the data into an existing array. Formating of the array and the data therein are configurable. See DB_result::fetchInto() for more information. param: resource $result query result identifier param: array $arr (reference) array where data from the row param: int $fetchmode how the resulting array should be indexed param: int $rownum the row number to fetch return: mixed DB_OK on success, null when end of result set is |
| freeResult(&$result) X-Ref |
| Free the internal resources associated with $result. param: $result SQLite result identifier return: bool true on success, false if $result is invalid |
| numCols($result) X-Ref |
| Gets the number of columns in a result set. return: number of columns in a result set |
| numRows($result) X-Ref |
| Gets the number of rows affected by a query. return: number of rows affected by the last query |
| affectedRows() X-Ref |
| Gets the number of rows affected by a query. return: number of rows affected by the last query |
| errorNative() X-Ref |
| Get the native error string of the last error (if any) that occured on the current connection. This is used to retrieve more meaningfull error messages DB_pgsql way since sqlite_last_error() does not provide adequate info. return: string native SQLite error message |
| errorCode($errormsg) X-Ref |
| Determine PEAR::DB error code from the database's text error message. param: string $errormsg error message returned from the database return: integer an error number from a DB error constant |
| dropSequence($seq_name) X-Ref |
| Deletes a sequence param: string $seq_name name of the sequence to be deleted return: int DB_OK on success. DB_Error if problems. |
| createSequence($seq_name) X-Ref |
| Creates a new sequence param: string $seq_name name of the new sequence return: int DB_OK on success. A DB_Error object is returned if |
| nextId($seq_name, $ondemand = true) X-Ref |
| Returns the next free id in a sequence param: string $seq_name name of the sequence param: boolean $ondemand when true, the seqence is automatically return: int the next id number in the sequence. DB_Error if problem. |
| getSpecialQuery($type, $args=array() X-Ref |
| Returns the query needed to get some backend info. Refer to the online manual at http://sqlite.org/sqlite.html. param: string $type What kind of info you want to retrieve return: string The SQL query string |
| getDbFileStats($arg = '') X-Ref |
| Get the file stats for the current database. Possible arguments are dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, blocks or a numeric key between 0 and 12. param: string $arg Array key for stats() return: mixed array on an unspecified key, integer on a passed arg and |
| escapeSimple($str) X-Ref |
| Escape a string according to the current DBMS's standards In SQLite, this makes things safe for inserts/updates, but may cause problems when performing text comparisons against columns containing binary data. See the {@link http://php.net/sqlite_escape_string PHP manual} for more info. param: string $str the string to be escaped return: string the escaped string |
| modifyLimitQuery($query, $from, $count, $params = array() X-Ref |
| Pas de description |
| _modifyQuery($query) X-Ref |
| "DELETE FROM table" gives 0 affected rows in SQLite. This little hack lets you know how many rows were deleted. param: string $query The SQL query string return: string The SQL query string |
| sqliteRaiseError($errno = null) X-Ref |
| Gather information about an error, then use that info to create a DB error object and finally return that object. param: integer $errno PEAR error number (usually a DB constant) if return: object DB error object |
| Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |