this is a helper for php crud operation.
create a new file index.php
then , open index.php
& config.php
in your text editor .
In config.php
, You need to setup Database connection as first.
then index.php
,
put these at the top ,
include 'database/index.php';
DB::insert($table, $data);
$table
= its your table name,
$data
= A array ,where key will be the column of your table.
DB::select($table);
$results = DB::select($table);
while ($rows = $results->fetch_assoc()) {
echo $rows['name'];
}
DB::update($table, $data, $id);
DB::delete($table, $id);
Enjoy!