PHP Classes


Recommend this page to a friend!
  Classes of Kakhaber Kashmadze  >  DbUtils  >  >  Download  
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: DbUtils
Access and Manage MySQL, PostgreSQL or MS SQL
Author: By
Last change: example and readme
Date: 4 years ago
Size: 876 bytes


Class file image Download

Database Utilities

Access and Manage MySQL, PostgreSQL, MicrosoftSQL database using PHP Data Objects (PDO)

use DbUtils\Db;
use DbUtils\Helper\HelperDb;


require_once 'params.php';

$dbMapper=new DbMapper(array(

Db::init($dbMapper->getDbparams(), $dbMapper->getDb());

require_once 'include/classes/DbUtils/Db.php';
require_once 'include/classes/DbUtils/DbMapper.php';
require_once 'include/classes/DbUtils/Helper/HelperDb.php';

Db::init($dbMapper->getDbparams(), $dbMapper->getDb());

Retrieve one row from table users:

$row=Db::fetchRow("select lname, fname from users where id=1");
echo $row['lname']." ".$row['fname']."\n";
For more information send a message to info at phpclasses dot org.