Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_create_script.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mark Williamson  >  dbApiCreate  >  sample_create_script.txt  >  Download  
File: sample_create_script.txt
Role: Sample output
Content type: text/plain
Description: example of api created using class
Class: dbApiCreate
Creates mysql database access libraries in php
Author: By
Last change: none
Date: 2003-03-07 17:15
Size: 642 bytes
 

Contents

Class file image Download
#!/usr/local/bin/php -q
<?php
include_once("../../php_libraries/dbApiCreate.inc");

$t = new CreateApi();                                 
$t->setNamedConnection("changelog");                   
$t->setTable("changes"); 
$t->setDb("changelog"); 
$t->create_named_connection("127.0.0.1", "root", "cyber"); 
$t->LearnTableLayout();
$t->createAddFunction();
$t->createGenericEdit();
$t->createEditFunction();
$t->createDeleteFunction();
$t->createFindByFunction("change_id", "int");
$t->createFindByFunction("userid", "string");
$t->createFindByFunction("change_desc", "string");
$t->createGenericFind();
$t->finishApi();
?>