Private Method Details |
sql_connect |
private mixed sql_connect( string $host, string $user, string $password, [ string $name ] )
|
|
Connects to a MySQL Server.
|
Parameter |
|
string |
$host |
|
|
database host |
|
|
string |
$user |
|
|
database user name |
|
|
string |
$password |
|
|
database user password |
|
|
string |
$name |
= >>""<< |
|
database name |
|
Returns |
mixed Returns a MySQL link identifier on success, or FALSE on failure. |
Required global variables |
|
boolean $salPersistentConnect |
Define whether to perform persistent connect to SQL server |
|
|
sql_close |
private boolean sql_close( [ resource $connection ] )
|
|
Disconnects from a MySQL server.
|
Parameter |
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
boolean TRUE on success, FALSE on error. |
Required global variables |
|
boolean $salPersistentConnect |
Define whether to perform persistent connect to SQL server |
|
|
sql_select_db |
private boolean sql_select_db( string $name )
|
|
Selects a MySQL database.
|
Parameter |
|
string |
$name |
|
|
database name |
|
Returns |
boolean TRUE on success, FALSE on error. |
|
sql_query |
private mixed sql_query( string $query, [ resource $connection ] )
|
|
Sends a MySQL query.
|
Parameter |
|
string |
$query |
|
|
MySQL query |
|
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
mixed MySQL result on success, or FALSE on error. |
|
sql_num_rows |
private integer sql_num_rows( resource $queryresult )
|
|
Gets the number of rows in result.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result |
|
Returns |
integer Returns the number of rows in a result set. |
|
sql_num_fields |
private integer sql_num_fields( resource $queryresult )
|
|
Gets the number of fields in result.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result |
|
Returns |
integer Returns the number of fields in a result set. |
|
sql_fetch_row |
private mixed sql_fetch_row( resource $queryresult, [ integer $nr ] )
|
|
Gets a result row as an enumerated array. Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
Fetch one row of data from the result associated with the specified result identifier.
The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result |
|
|
integer |
$nr |
= >>0<< |
|
reserved |
|
Returns |
mixed Array that corresponds to the fetched row, or FALSE if there are no more rows. |
|
sql_fetch_array |
private mixed sql_fetch_array( resource $queryresult, [ integer $nr ] )
|
|
Fetch a result row as an associative array, a numeric array, or both. Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
In addition to storing the data in the numeric indices of the result array,
it also stores the data in associative indices, using the field names as keys.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result |
|
|
integer |
$nr |
= >>0<< |
|
reserved |
|
Returns |
mixed Array that corresponds to the fetched row, or FALSE if there are no more rows. |
|
sql_fetch_object |
private mixed sql_fetch_object( resource $queryresult, [ integer $resulttype, integer $nr ] )
|
|
Fetches a result row as an object. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result |
|
|
integer |
$resulttype |
= >>0<< |
|
Result type |
|
|
integer |
$nr |
= >>0<< |
|
Reserved |
|
Returns |
mixed Object with properties that correspond to the fetched row, or FALSE if there are no more rows. |
|
sql_fetch_field |
private object stdClass sql_fetch_field( resource $queryresult, [ integer $offset ] )
|
|
Gets column information from a result and returns it as an object. Returns an object containing field information.
Can be used in order to obtain information about fields in a certain query result.
If the field offset isn't specified, the next field that wasn't yet retrieved by fetch_field() is retrieved.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result. |
|
|
integer |
$offset |
= >>0<< |
|
Field offset. |
|
Returns |
object stdClass Object containing field information.
The object properties are:
- name - column name
- table - name of the table the column belongs to;
- max_length - maximum length of the column;
- not_null - 1 if the column cannot be NULL;
- primary_key - 1 if the column is a primary key;
- unique_key - 1 if the column is a unique key;
- multiple_key - 1 if the column is a non-unique key;
- numeric - 1 if the column is numeric;
- blob - 1 if the column is a BLOB;
- type - the type of the column;
- unsigned - 1 if the column is unsigned;
- zerofill - 1 if the column is zero-filled.
|
|
sql_result |
private mixed sql_result( resource $queryresult, [ integer $row, mixed $field ] )
|
|
Gets result data.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result |
|
|
integer |
$row |
= >>0<< |
|
The rows offset |
|
|
mixed |
$field |
= >>0<< |
|
The field's offset, or the field's name, or the field's table dot field's name (tabledname.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. |
|
Returns |
mixed The contents of one cell from a MySQL result set. |
|
sql_free_result |
private boolean sql_free_result( resource $queryresult )
|
|
Frees result memory. Will free all memory associated with the result identifier result.
|
Parameter |
|
resource |
$queryresult |
|
|
MySQL result |
|
Returns |
boolean TRUE on success, FALSE on error. |
|
sql_insert_id |
private integer sql_insert_id( [ resource $queryresult, resource $connection ] )
|
|
Gets the ID generated from the previous INSERT operation.
|
Parameter |
|
resource |
$queryresult |
= >>NULL<< |
|
MySQL result |
|
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
integer The ID generated for an AUTO_INCREMENT column by the previous INSERT query using the given MySQL link identifier. |
|
sql_error |
private string sql_error( [ resource $connection ] )
|
|
Returns the text of the error message from the previous MySQL operation.
|
Parameter |
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
string Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred. |
|
sql_list_dbs |
private array sql_list_dbs( [ resource $connection ] )
|
|
Lists databases available on a MySQL server.
|
Parameter |
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
array Array of database names |
|
sql_list_tables |
private array sql_list_tables( string $db, [ resource $connection ] )
|
|
Lists tables in a MySQL database.
|
Parameter |
|
|
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
array Array of table names |
|
sql_list_fields |
private array sql_list_fields( string $db, string $table, [ resource $connection ] )
|
|
Lists MySQL result fields.
|
Parameter |
|
|
|
|
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
array Array of fields names |
|
sql_affected_rows |
private integer sql_affected_rows( [ resource $connection ] )
|
|
Gets the number of affected rows in the previous MySQL operation.
|
Parameter |
|
resource |
$connection |
= >>NULL<< |
|
MySQL link identifier |
|
Returns |
integer Returns the number of rows affected by the last INSERT, UPDATE or DELETE query associated with the MySQL link identifier. |
|