PHP Classes

File: index.php

Recommend this page to a friend!
  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: 17 years ago
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') > 0 )
       
$entries->outputHTML();
?>