F_db_affected_rows (line 105)
Returns number of rows (tuples) affected by the last INSERT, UPDATE or DELETE query associated with link_identifier.
Number
F_db_affected_rows
(resource $link_identifier, resource $result)
-
resource
$link_identifier: database link identifier.
-
resource
$result: result resource to the query result [UNUSED].
F_db_close (line 63)
Closes the non-persistent connection to a database associated with the given connection resource.
bool
F_db_close
(resource $link_identifier)
-
resource
$link_identifier: database link identifier.
F_db_connect (line 45)
Open a connection to a MySQL Server and select a database.
If a second call is made to mysql_connect() with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned.
MySQL
F_db_connect
([mixed $host = 'localhost'], [mixed $port = '3306'], [string $username = 'root'], [string $password = ''], [string $database = ''], string $server)
-
string
$server: Database server path. It can also include a port number. e.g. "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for the localhost. Note: Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as mysql.default_host in your PHP configuration and leave the server field blank.
-
string
$username: Name of the user that owns the server process.
-
string
$password: Password of the user that owns the server process.
-
string
$database: Database name.
F_db_error (line 71)
Returns the text of the error message from previous database operation
string
F_db_error
()
F_db_fetch_array (line 95)
Fetch a result row as an associative and numeric array.
Note: This function sets NULL fields to PHP NULL value.
Returns
F_db_fetch_array
(resource $result)
-
resource
$result: result resource to the query result.
F_db_insert_id (line 125)
Get the ID generated from the previous INSERT operation
int
F_db_insert_id
(resource $link_identifier, [string $tablename = ''], [string $fieldname = ''])
-
resource
$link_identifier: database link identifier.
-
string
$tablename: Table name.
-
string
$fieldname: Field name (column name).
F_db_num_rows (line 114)
Get number of rows in result.
Number
F_db_num_rows
(resource $result)
-
resource
$result: result resource to the query result.
F_db_query (line 83)
Sends a query to the currently active database on the server that's associated with the specified link identifier.
NOTE: Convert PostgreSQL RANDOM() function to MySQL RAND() on ORDER BY clause of selection queries.
FALSE
F_db_query
(string $query, resource $link_identifier)
-
string
$query: The query tosend. The query string should not end with a semicolon.
-
resource
$link_identifier: database link identifier.