Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.mysqli.version.0.2.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.version.0.2.php  >  Download  
File: sample.mysqli.version.0.2.php
Role: Example script
Content type: text/plain
Description: MySqli Version 0.2 Sample
Class: QDataObject
Access MySQL query results as objects
Author: By
Last change:
Date: 2008-07-19 07:03
Size: 556 bytes
 

Contents

Class file image Download
<?php

$link 
mysqli_connect(
    
"your-host"
    
"your-database-user"
    
"your-database-password",
    
'your-database'
    
) OR die(mysqli_error());


$sql "SELECT * FROM order_details"

$result mysqli_query($link$sql);

//$dataObject = new QMysqliDataObject($result, $link);
//$dataObject->byLimit(1000,5);
//print "<pre>";
//print_r($dataObject);
//print "</pre>";

$dataObject = new QMysqliDataObject($result$link);
$dataObject->byPage((int)$_GET["p"], (int)$_GET["s"]);

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