PHP Classes

File: sample.mysqli.version.0.2.php

Recommend this page to a friend!
  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: 16 years ago
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>";