Location: PHPKode > scripts > dbApiCreate > dbapicreate/sample_create_script.txt
#!/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();
?>
Return current item: dbApiCreate