PHP Classes

File: examples/db/example_db_mysql.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/db/example_db_mysql.php   Download  
File: examples/db/example_db_mysql.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 392 bytes
 

Contents

Class file image Download
<?php
include 'config.php';

$db = new A_Db_Mysql($ConfigArray['DBDSN']);
$db->connect();
if (!
$db->isError()) {

   
$sql = "SELECT * FROM users";
   
$result = $db->query($sql);
    if (!
$db->isError()) {
       
$row = $result->fetchAll();
dump($row, 'ROW: ');

    } else {
        echo
'connect ERROR: ' . $db->getErrorMsg();
    }

} else {
    echo
'connect ERROR: ' . $db->getErrorMsg();
}