Re: Need help converting DBase data to MySql
| From: | Miles Thompson | Date: | Thu, 14 Dec 2000 23:44:35 +0000 |
| Subject: | Re: Need help converting DBase data to MySql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30395@lists.php.net to get a copy of this message | ||
Couple of questions/observations:
If 20001201 is your date, it is in the 5th, nott he 6th position.
What is 12 1 11?
Have you tried wrapping each field in quotation marks?
What is your MySQL data format? Does it match the dBase one? Check your
MySQL manual and read about date formats very carefully.
Miles Thompson
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.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net