File: example.php

Recommend this page to a friend!
  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: 20 years ago
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>

For more information send a message to info at phpclasses dot org.