Login   Register  
PHP Classes
elePHPant
Icontem

File: example_1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Paul Gillespie  >  SQL Data Manager  >  example_1.php  >  Download  
File: example_1.php
Role: Example script
Content type: text/plain
Description: This is an example of how to use the manager for basic sql queries.
Class: SQL Data Manager
Access MySQL databases
Author: By
Last change:
Date: 2010-03-03 05:54
Size: 757 bytes
 

Contents

Class file image Download
<?php

include_once("SQLDataManager/SQLDataManager.php");

$ConfigFile "config/mysql_access.config";
$Sql        "select * from r_shop_data";

$SQLDataManager = new SQLDataManager($ConfigFile);

$SQLDataManager->setType("R");
$SQLDataManager->setSql($Sql);

$Status $SQLDataManager->performSql();

if(
$Status == 1) {
    
$Results $SQLDataManager->getResults();

    
$RowCount   $Results->getRowCount();

    for(
$Row=0$Row<$RowCount$Row++) {
        
$ShopName $Results->getRow($Row)->get_shop_name();

        print(
$ShopName->getValue() . "<br/>");
        print(
$ShopName->getUppercase() . "<br/>");
        print(
$ShopName->getLowercase() . "<br/>");
    }
}
else {
    print(
"An error has occured.");
}

?>