Login   Register  
PHP Classes
elePHPant
Icontem

File: ClassTestFile/testQueryResult.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Guerrieri Luca  >  PXAServer  >  ClassTestFile/testQueryResult.php  >  Download  
File: ClassTestFile/testQueryResult.php
Role: Example script
Content type: text/plain
Description: Test for Query Result Class
Class: PXAServer
Library to build applications configured with XML
Author: By
Last change:
Date: 7 years ago
Size: 527 bytes
 

Contents

Class file image Download
<?php
/*
 * File di test della classe QueryResult 
 */
require('../libreria/global.inc.php');

//invoco la classe DBConnect per collegarmi al sermer MYSql
$db = new DBconnect;
$db ->db_type="mysql";
$db ->db_param('localhost','root','','acms');
$link=$db ->open();

//eseguo la query che passo come argomento
$Qr = new QueryResult("SELECT * FROM `utenti`","assoc",$link);
foreach ((
$Qr->result()) as $key=>$valore){
    foreach (
$valore as $key=>$val){
        echo 
"$key=>$val.<br>";
    }
}

$db ->close($link);
?>