Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Duy A. Nguyen  >  Small MySQL Connection  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: sample
Class: Small MySQL Connection
MySQL database access wrapper
Author: By
Last change: new update
Date: 2006-04-30 10:03
Size: 595 bytes
 

Contents

Class file image Download
<?
    
include('config.inc.php');
    
    function 
__autoload($class_name
    {
        require_once (
strtolower($class_name) . '.cls.php');
    }
/*
    $db = MySQLConnection::init();
    
    $sql = 'select * from agu_ency_entries where usr_id = ? and usr_account = ?';
    
    $ret = $db->executeQuery($sql, 6, 'Jesse');
    
    print_r($ret);
*/

/*    $entry = new AguEncyEntry();
    
    $entry->id = 2;
    $entry->name = 'MS Excel';
    $entry->description = 'Microsoft Excel';
    
    echo $entry->update();
*/
    
$entries = new AguEncyEntries();
    
    if( 
$entries->loadByName('ms') > )
        
$entries->outputHTML();
?>