<html>
<? require("dbf2sql.php"); ?>
<?
// this is an array that describes the DBF structure
// with the column numbers and column names (for SQL instructions)
$myarray = array(
"0" => array("0", "id"),
"1" => array("1", "name"),
"2" => array("2", "phone"),
"3" => array("3", "address")
);
// the class is inhearited
$conversao = new dbf2sql;
// customer DBf file is opened
// destination SQL file is customer.sql
// table name into SQL file is customer
$ok = $conversao->opendb("customer.dbf", "customer.sql", "customer");
echo($ok);
// Open the SQL file for write
$ok = $conversao->opensql();
echo($ok);
// Get the Columns and write it into a SQL file
$conversao->GetColumns( $myarray );
// Close DBF and SQL files
$conversao->closeall();
?>
</html> |