Tariqa  3.0
 All Data Structures Namespaces Files Functions Variables Enumerations
mMysql Class Reference

Public Member Functions

 __construct ($host, $user, $password, $database, $port, $charset= 'UTF-8', $autocommit=true)
 mQuery ($query)
 last_insert_id ()
 count_rows ($table, $condition=null)
 get_value ($table, $field, $condition=null)
 get_function_value ($name, $params=null)

Constructor & Destructor Documentation

__construct ( host,
user,
password,
database,
port,
charset = 'UTF-8',
autocommit = true 
)

The constructor

Parameters:
string$hostThe host server
string$userThe user name
string$passwordThe password
string$databaseThe database name
string$charsetThe charset [OPTIONAL]
string$autocommitThe autocommit [OPTIONAL] public
Returns:
mysqli

Member Function Documentation

count_rows ( table,
condition = null 
)

Gets the number of rows from a table

Parameters:
string$tableThe table name
string$conditionThe condition [OPTIONAL] public
Returns:
int
get_function_value ( name,
params = null 
)

Gets a value from a mysql function

Parameters:
string$nameThe function name
mixed$paramsThe function parameters (a value or an array of values) [OPTIONAL] protected
Returns:
mixed
get_value ( table,
field,
condition = null 
)

Gets a field value based on a condition

Parameters:
string$tableThe table name
string$fieldThe field name
string$conditionThe condition [OPTIONAL] public
Returns:
mixed

Gets the last inserted id public

Returns:
mixed
mQuery ( query)

The query function (it calls the mysqli query function and checks for errors

Parameters:
string$queryThe query public
Returns:
mixed

The documentation for this class was generated from the following file: