Skip to content

tcmacdonald/db-pdo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Usage

Include libs/DbPDO.class.php and define the following constants.

<?php
include(‘libs/DbPDO.class.php’);
define(‘DBHOST’,‘localhost’);
define(‘DBNAME’,‘database’);
define(‘DBUSER’,‘username’);
define(‘DBPASS’,‘password’);

Instantiate the class by calling the connect method.

<?php
$db = DbPDO::connect();

Run your queries.

<?php
$rows = $db→fetchAll(‘select * from table’);

About

Singleton PDO class for PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages