PHP Classes

File: test.php

Recommend this page to a friend!
  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: 19 years ago
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();
?>