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 Hensel Hartmann  >  Fast DB Class Generator  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Runs the main class for demo purposes and holds some helptext
Class: Fast DB Class Generator
Generate classes to access MySQL database tables
Author: By
Last change:
Date: 2012-01-26 09:57
Size: 1,319 bytes
 

Contents

Class file image Download
<?php

/**
 * @author simpeligent.ch
 * @copyright 2012
 * 
 * this file shows how to use the generator
 * 
 */

require_once('db.config.php');
require_once(
'EXAMPLE-CLASS.class.php');


    
/* how to use the generator * /
    1.  set the db detail in db.config.php
        this file also contains a very short DB-connection class 
        to facilitate the working with the generator
    2.  run this script! 
        I suggest to run it in an otherwise empty folder.
        All class files will be stored here
    3.  done - you now have an Object oriented class (php5) for each DB table, capable of:
        - read a list of all or some items to an object and/or output as array
        - read one item to an object and/or output as array
        - change specific properties of a loaded object
        - save the modified object
        - create a new object
        - delete an object 
    /*------------*/
    
 
require_once('db.config.php'); // include the DB helper
 
require_once('class.fastDB.php'); // include the main class
 
$t = new fastDB();             // start the class
 
$t->con connectDB::getConn();// attach the DB connection
 
$t->dbname DBNAME;           // set the DB name
 
$t->process();                 // run the process
 /* */

/*

*/






?>