Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nic Stevens  >  MySQL Table Abstraction Class  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: MTAC Test
Class: MySQL Table Abstraction Class
Wrap the access to MySQL database table rows
Author: By
Last change:
Date: 2005-07-22 19:32
Size: 388 bytes
 

Contents

Class file image Download
<?
require_once('mtac.php');

$dbhost "localhost";
$dbuser "test";
$dbpass "fortytwo";

$link=mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db("test");

try {
    
$x = new mtac($link,"mtacuser","Frank Jones");
} catch (
Exception $e) {
    
    echo 
"Caught exception: " $e->getMessage() . "\n";
    exit;
}

var_export($x);

$x->d['password'] = md5('foobar');
$x->put();
?>