1. Go to this page and download the library: Download thiagosv/controller-pdo 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/ */
thiagosv / controller-pdo example snippets
sh
agoSV\ControllerPDO\Read;
$Read->read("table", "WHERE column1 = :param AND column2 = :param2", "param=value¶m2=value2");
$Read->readFull("SELECT * FROM table WHERE column1 = :param AND column2 = :param2", "param=value¶m2=value2");
$Read->getResult(); ** **
sh
agoSV\ControllerPDO\Update;
$Update->update("tabela", ['value1' => 'value2'], "WHERE column1 = :param AND column2 = :param2", "param=value¶m2=value2");
$Update->getResult(); ** **
sh
agoSV\ControllerPDO\Delete;
$Delete->delete("table", "Query sem select", "param=value¶m2=value2");
$Delete->getResult(); ** **