Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Pablo DallOglio  >  dbf2sql  >  example.php  >  Download  
File: example.php
Role: ???
Content type: text/plain
Description: example file
Class: dbf2sql
Author: By
Last change:
Date: 2001-04-07 09:48
Size: 879 bytes
 

Contents

Class file image Download
<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>