Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.mysqli.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  QDataObject  >  sample.mysqli.php  >  Download  
File: sample.mysqli.php
Role: Example script
Content type: text/plain
Description: sample for mysqli
Class: QDataObject
Access MySQL query results as objects
Author: By
Last change: enable to config and autoloading
Date: 6 years ago
Size: 482 bytes
 

Contents

Class file image Download
<?php 

include_once('config.inc.php');

$link mysqli_connect(
    
db_default_host
    
db_default_user
    
db_default_password,
    
db_default_database
    
) OR die(mysqli_error());


$sql "SELECT * FROM order_details"

$result mysqli_query($link$sql);

$dataObject QDataObject::getInstance('mysqli',$result$link);
$dataObject->byPage((int)$_GET["p"], (int)$_GET["s"]);
//$dataObject->byLimit(1000,5);

print "<pre>";
print_r($dataObject);
print 
"</pre>";