开发者

Migration of mysql table to DBF file

开发者 https://www.devze.com 2023-03-29 14:50 出处:网络
I am trying to import mysql table data to dbf (database foxpro) file using PHP.. I am utilizing the dbase functions to *dbase_create* to create database with the field names as same as in mysql tabl

I am trying to import mysql table data to dbf (database foxpro) file using PHP..

I am utilizing the dbase functions to *dbase_create* to create database with the field names as same as in mysql table and added records of the mysql table using dbase_add_record() function..

Default datatype and length for "DATE" in dbf file is "D" and "8".

But im开发者_StackOverflow社区ported dbf file shows that field type = "D" and field_length = "0".

Help to fix this problem thanks in advance


I think you should convert MYsql date to dbf date in php.

For example,

 $dbf_date = date('Ymd', strtotime($your_mysql_date));

Use $dbf_date during insert.

0

精彩评论

暂无评论...
验证码 换一张
取 消