Compiled Chronicles

A software development blog by Angelo Villegas

PHP: DBClass

DBClass is a simple PHP class that will help ease database connection usage. You can download the script in the links listed below.

DBClass Download links

Sample Usage :

$dbClass = new DBClass();
$result = $dbClass->query( $dbQuery );

while ( $content = $dbClass->fetchAssoc( $result ) )
{
	echo $content['description'];
}

Functions :

  • query()
  • numRows()
  • fetchAssoc()
  • fetchArray()
  • freeResult()
  • close()
  • sql_error()

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *