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


Class file image Download
<? 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");

// Open the SQL file for write
$ok = $conversao->opensql();

// Get the Columns and write it into a SQL file
$conversao->GetColumns( $myarray );

// Close DBF and SQL files

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