View unanswered posts | View active topics It is currently Sun Oct 21, 2018 11:54 pm

Reply to topic  [ 2 posts ] 
 write to dbf 
Author Message
Junior Member

Joined: Mon Sep 27, 2004 10:45 pm
Posts: 1
hi all,
i want to download my data for example :
data of $data will download to .dbf using Php.
how can i do it?


Mon Sep 27, 2004 11:04 pm
Report this post
Junior Member

Joined: Wed Feb 16, 2005 10:34 pm
Posts: 5
First of all, fetch your MySQL data with something like this :

# Fetching MySQL
while ($row = mysql_fetch_array($firstdata, MYSQL_ASSOC)){

Ok. Now I'm not sure if you already have a dbf file that you want to update or no dbf, so you want to create it first. I will assume that you dont have any dbf yet. I will assume also that you have fetched only the good data with your MySQL query and that these 2 datas are "value1" and "value2"...

Something like this should do the trick :

# Creation of dbf
if (!dbase_create($dbasePath, $def)) {
die("Error, can't create the database");
# Entering the results in your dbf
$db = dbase_open($dbasePath,2);
if ($db){
while (list($key,$val)=each($arrayDef)){

For any other thing you want to do with dbf, you can consult PHP doc on dBase Functions.

Fri Feb 18, 2005 6:29 am
Report this post
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
© Copyright 2003-2008 The ultimate PHP Editor and PHP IDE site.