Private Method Details |
check_db_error |
private void check_db_error( [ string $result, string $postfix ] )
|
|
Checks if result of most recent query is successful.
It invokes func::phpx_assert().
|
Parameter |
|
string |
$result |
= >>TRUE,<< |
|
- xxx_query() result. |
|
|
string |
$postfix |
= >>"--"<< |
|
- the string to append to log. |
|
Returns |
void |
|
do_query |
private int do_query( string $sql )
|
|
Performs the db query and checks the errors.
| $rset = do_query (
| "select * from table ..."
| );
| while (fetch_object($rset, $rec)) {
| ...
| }
| free_result($rset);
|
Parameter |
|
string |
$sql |
|
|
- SQL statement. |
|
Returns |
int - query result (recordset). |
|
fetch_query |
private void fetch_query( string $sql, array &$result, [ string $mode ] )
|
|
Fetches recordset as an array.
| $count = fetch_query (
| "select * from table ..."
| $records
| );
|
Parameter |
|
string |
$sql |
|
|
- SQL statement. |
|
|
array |
&$result |
|
|
- [out] record array. |
|
|
string |
$mode |
= >>MYSQL_ASSOC<< |
|
- what each record is.
Useful to fetch *small* recordset only! |
|
Returns |
void |
|
rset_rows |
private int rset_rows( int $rset )
|
|
Returns row number from recordset.
|
Parameter |
|
|
Returns |
int - row number. |
|
free_result |
private void free_result( int $rset )
|
|
Disposes the recordset.
|
Parameter |
|
int |
$rset |
|
|
- the recordset to dispose. |
|
Returns |
void |
|
fetch_record |
private mixed fetch_record( int $rset, array &$result, [ string $mode ] )
|
|
Fetches next record as a hash.
|
Parameter |
|
|
|
array |
&$result |
|
|
- [out] record. |
|
|
string |
$mode |
= >>MYSQL_ASSOC<< |
|
- what the record is. |
|
Returns |
mixed - non-0 on success. |
|
fetch_object |
private mixed fetch_object( int $rset, object [unknown] &$result, [ string $mode ] )
|
|
Fetches next record as a object.
|
Parameter |
|
|
|
object [unknown] |
&$result |
|
|
- [out] record. |
|
|
string |
$mode |
= >>MYSQL_ASSOC<< |
|
- what the record is. |
|
Returns |
mixed - non-0 on success. |
|
fetch_field |
private mixed fetch_field( int $rset, object [unknown] &$field, int $i )
|
|
Fetches field metainfo.
The output field contains at least thwo members:
|
Parameter |
|
|
|
object [unknown] |
&$field |
|
|
- [out] field. |
|
|
|
Returns |
mixed - non-0 on success. |
|
show_tables_like |
private int show_tables_like( string $wild, array &$result )
|
|
Returns array of database table names matching to wildcard.
|
Parameter |
|
string |
$wild |
|
|
- whildcard. |
|
|
array |
&$result |
|
|
- [out] names. |
|
Returns |
int - names count. |
|
sql_crypt |
private void sql_crypt( $pwd, string $salt )
|
|
Database-specific crypt function. *
|
Parameter |
|
|
$pwd |
|
|
No additional comments. |
|
|
string |
$salt |
|
|
No additional comments. |
|
Returns |
void |
|