Re: importing DBF data into mysql
| From: | Pablo M. Rivas | Date: | Thu, 02 Sep 2004 13:03:47 +0000 |
| Subject: | Re: importing DBF data into mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195550@lists.php.net to get a copy of this message | ||
Let's try this:
<?php
$db=dbase_open ( "path/to/file.dbf",0 );
$nr = dbase_numrecords($db);
echo "File opened with $nr records<br>\n";
$temp = dbase_get_record($db,$i);
print_r($temp);
?>
this simple program should show you the fields of the record 1 of the file.
if it works, let us know
Pablo.
On Thu, 02 Sep 2004 08:40:51 -0400, PHP Junkie <phpjunkie@mjimm.com> wrote:
> Ave,
>
> This is undoubtedly exactly what I was looking for. What I don't understand
> is why its' not converting my DBF file. It gives a "Could not read File"
> error. It reads the dbf file that came with the script. I'm still trying to
> figure it out but it won't work...
>
> Thanks though.
>
>
>
>
> On 9/1/04 6:52 PM, "Thornton" <thornton-php@cierragroup.com> wrote:
>
> > This is probably what your looking for
> >
> > http://www.coolnet.cz/miro/dbf2mysql/dbf2mysql.tar.bz2
> >
> > It should handle your needs
> >
> > On Wed, 2004-09-01 at 14:08, PHP Junkie wrote:
> >> Ave,
> >>
> >> Is there a PHP script that is able to import or convert DBF data into mySQL
> >> tables?
> >>
> >> I need to get my DBF data into mySQL and PHPMyAdmin couldn't handle it.
> >> Another problem I have is I'm running a MAC OS X... There is a very simple
> >> and efficient DBF2MYSQL program for windows but not for MAC.
> >>
> >> I did see somewhere a PHP script that could do it, but I don't know where.
> >>
> >> Thanks.
> > ----------------------------------------------------------------------
> > - Thornton thornton@cierragroup.com -
> > - Cierra Group
> > http://www.cierragroup.com -
> > ----------------------------------------------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Pablo M. Rivas. http://pmrivas.ipupdater.com
-----------------------------------------------------------