Re: Need help converting DBase data to MySql

From: Date: Thu, 14 Dec 2000 16:18:04 +0000
Subject: Re: Need help converting DBase data to MySql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30306@lists.php.net to get a copy of this message
On Thu, 14 Dec 2000, Wen Ni wrote: > I'm trying to convert data from Dbase to MySQL using PHP3. The problem I > encountered is as follows:- > > Whenever I have a DBase date field between numeric fields, I am not able > to convert the data to MySQL properly. It will convert the data in the > numeric field that's before the date field, and then it will try to put > the data in the date field and all the other data in the subsequent > fields into the one date field in MySQL, which it will fail since it > wouldn't be able to fit. > > An example of my Dbase file structure is as follows :- > > NAME CHAR 40 > CATEGORY CHAR 15 > AL_ENT NUM 6 2 > AL_TAKEN NUM 6 2 > AL_BAL NUM 6 2 > DATE_TAKEN DATE > MC_ENT NUM 6 2 > MC_TAKEN NUM 6 2 > MC_BAL NUM 6 2 > > When I display the data it is trying to insert into MySQL, it is as > follows:- > > MR TEST,16,10,6,20001201 12 1 11,0,0,0 > > Can anyone who has converted data from DBase to MySQL help me or share > your experience with me? > > I would be glad to provide a snippet of my code if required. > > Thanks in advance. > Arbaayah. > Try: 1) Putting quotes around all character values. If you've done that, this post doesn't reflect that. 2) Putting dates in YYYYMMDDHHmmSS format (e.g., 20001214111700). -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#30306) next »