Sunday, 2 August 2015

MYSQL PHP API

You will need to download the api from here.

insert_records($table, $columns, $records,true);

//BULK INSERT
$columns = array("name");
$records = array("Mwenda","Marvik","Victor");
$dbutils->bulk_insert_records($table, $columns, $records,true);


//UPDATE DATA
$where_columns = array("name");
$where_records = array("Mwenda");
$columns = array("name");
$records = array("Vicky");
$dbutils->update_record($table, $columns, $records, $where_columns, $where_records,true);


//DELETE_DATA
$columns = array("name");
$records = array("Marvik");
$dbutils->delete_record($table, $columns, $records,true);


//COMPLEX METHODS

//QUERY && FETCH ASSOC
$columns = array("name");
$records = array("Vic");
$results = $dbutils->fetch_assoc($table, $columns, $records,true);
for($i = 0;$isearch($table, $columns, $records,true);
for($i = 0;$i

View in Github