PHP Classes

File: sample.v3.mysqli.php

Recommend this page to a friend!
  Packages of Tom Schaefer   QDataObject   sample.v3.mysqli.php   Download  
File: sample.v3.mysqli.php
Role: Example script
Content type: text/plain
Description: basic mysqli version 3
Class: QDataObject
Access MySQL query results as objects
Author: By
Last change:
Date: 18 years ago
Size: 531 bytes
 

 

Contents

Class file image Download
<?php 

/**
Attention:
you have to switch to v.0.3
*/
include_once('config.inc.php');

$link = mysqli_connect(
    db_default_host, 
    db_default_user,
    db_default_password,
    db_default_database
    ) OR die(mysqli_error());
if (!$link) {
    die('keine Verbindung möglich: ' . mysql_error());
}

$sql = "SELECT * FROM geodb_textdata";
 
$dataObject = QDataObject::getInstance('mysqli',$link, $sql);
$dataObject->byPage(($_GET["p"]?intval($_GET["p"]):1));


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