DbCon. class.php |
DbCon. class.phpSummary
Fetch TypesDbCOnmysql api wrapper class Properties
Load Balancing PropertiesThis functionality is pretty much all experimental at this point , and further documentation is currently lacking
Summary
DbCon
Parameters
fetch
Fetch data from a table and return as array Parameters
FlagsIf flags is submitted as FETCH_MULTI then a multidimensional array is returned that holds all the rows returned by the query If flags is submitted as FETCH_SMART then a multidimensional array is returned if the mysql result contains more than one row, else a normal array is returned that holds the content of this one row If flags is sub,itted as FETCH_FIELD then only the first field of the first row in the result is returned If flags is omited then a normal array is returned that holds the contents of the first row in the result get_fields
Returns column names in the form of an array for a certain table Parameters
Returns
insert_batch
Insert multiple rows into the same table in one statement Parameters
col_arr examplevalues exampleReturns
query_file
Sends contents of a file as a query, multiple queries can be seperated by ; within the file Parameters
Returns
|
Returns true microtime timestamp
function microtime_float()
function DbCon( $host, $dbname, $user, $pass, $permanent = false )
Fetch data from a table and return as array
function fetch( $sql, $flags = NULL, $use_lb = NULL )
Send an sql statement that writes data to a dable (insert, update, delete)
function query( $sql, $use_lb = NULL )
Returns column names in the form of an array for a certain table
function get_fields( $table, $use_lb = NULL )
returns the contents of the sql_history property to the screen in a readable manner
function print_history()
Escape a string
function esc( $str )
Check if a table exists
function table_exists( $table_name, $use_lb = NULL )
Insert multiple rows into the same table in one statement
function insert_batch( $table, $col_arr, $val_arr )
Sends contents of a file as a query, multiple queries can be seperated by ; within the file
function query_file( $path, $find = NULL, $replace = NULL )