PHP Classes

File: examples/db/example_db_mysqli.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/db/example_db_mysqli.php   Download  
File: examples/db/example_db_mysqli.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: 485 bytes
 

Contents

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

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

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

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

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