tce__db__dal__mysqli_8php

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
tce_db_dal_mysqli.php File Reference

Namespaces

 com\tecnick\tcexam\shared
 TCExam Shared Area.
 

Functions

 F_db_connect ($host= ‘localhost’, $port= ‘3306’, $username= ‘root’, $password= “, $database= “)
 
 F_db_close ($link_identifier)
 
 F_db_error ($link_identifier=null)
 
 F_db_query ($query, $link_identifier)
 
 F_db_fetch_array ($result)
 
 F_db_fetch_assoc ($result)
 
 F_db_affected_rows ($link_identifier, $result)
 
 F_db_num_rows ($result)
 
 F_db_insert_id ($link_identifier, $tablename= “, $fieldname= “)
 
 F_escape_sql ($link_identifier, $str, $stripslashes=true)
 

Detailed Description

MySQL driver for TCExam Database Abstraction Layer (DAL). This abstraction layer uses the same SQL syntax of MySQL.

Function Documentation

F_db_affected_rows (   $link_identifier,
  $result 
)

Returns number of rows (tuples) affected by the last INSERT, UPDATE or DELETE query associated with link_identifier.

Parameters
$link_identifier(resource) database link identifier.
$result(resource) result resource to the query result [UNUSED].
Returns
Number of rows.

F_db_close (   $link_identifier)

Closes the non-persistent connection to a database associated with the given connection resource.

Parameters
$link_identifier(resource) database link identifier.
Returns
bool TRUE on success or FALSE on failure

F_db_connect (   $host = ‘localhost’,
  $port = ‘3306’,
  $username = ‘root’,
  $password = ,
  $database =  
)

Open a connection to a MySQL Server and select a database.

Parameters
$host(string) database server host name.
$port(string) database connection port
$username(string) Name of the user that owns the server process.
$password(string) Password of the user that owns the server process.
$database(string) Database name.
Returns
MySQL link identifier on success, or FALSE on failure.

F_db_error (   $link_identifier = null)

Returns the text of the error message from previous database operation

Returns
string error message.

F_db_fetch_array (   $result)

Fetch a result row as an associative and numeric array. Note: This function sets NULL fields to PHP NULL value.

Parameters
$result(resource) result resource to the query result.
Returns
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_fetch_assoc (   $result)

Fetch a result row as an associative array. Note: This function sets NULL fields to PHP NULL value.

Parameters
$result(resource) result resource to the query result.
Returns
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_insert_id (   $link_identifier,
  $tablename = ,
  $fieldname =  
)

Returns the auto generated id used in the last query.

Parameters
$link_identifier(resource) database link identifier.
$tablename(string) Table name. (unused here but required for other DAL).
$fieldname(string) Field name (column name). (unused here but required for other DAL).
Returns
int ID generated from the last INSERT operation.

F_db_num_rows (   $result)

Get number of rows in result.

Parameters
$result(resource) result resource to the query result.
Returns
Number of affected rows.

F_db_query (   $query,
  $link_identifier 
)

Sends a query to the currently active database on the server that’s associated with the specified link identifier.

Parameters
$query(string) The query tosend. The query string should not end with a semicolon.
$link_identifier(resource) database link identifier.
Returns
FALSE in case of error, TRUE or resource-identifier in case of success.

F_escape_sql (   $link_identifier,
  $str,
  $stripslashes = true 
)

Escape a string for insertion into a SQL text field (avoiding SQL injection).

Parameters
$link_identifier(resource) database link identifier.
$str(string) The string that is to be escaped.
$stripslashes(boolean) if true strip slashes from string
Returns
string Returns the escaped string, or FALSE on error.
Since
5.0.005 2007-12-05

 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy