1. Go to this page and download the library: Download eden/postgre library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$filter[] = array('user_id=%s', 1);
$database->deleteRows('user', $filter); // delete rows in 'user' table where user_id is 1
//set user name for all rows
$collection->setUserName('Chris');
// set or get any abstract key for all rows
$collection->setAnyThing()
//collections are iterable
foreach($collection as $model) {
echo $model->getUserName().' ';
echo $model['user_email'];
}
//access as array
echo $collection[0]['user_name'];
//set as array
$collection[0]['user_email'] = '[email protected]';
$collection->save('user', $database); //save to 'user' table in database
//only relavent columns will be saved
//for all rows
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.