Jump to content

Convert Data And Instert Into Mysql


brobert

Recommended Posts

Hi all.

 

I`m new to this forum, please excuse me if I ask somethin stupid.

 

I have a problem with a datafile, which contains data in the following format:

000000001 LDR   L -----nam0-22------u-450-
000000001 001   L $$a0000001
000000001 100   L $$a--------d--------km-y0rumy0103----ba
000000001 1010  L $$atest


000000002 LDR   L -----nam0-22------u-450-
000000002 001   L $$a0000002
000000002 100   L $$a--------d--------km-y0rumy0103----ba
000000002 2001  L $$aUtcák, terek, emberek$$eZalaegerszeg$$dStreets, Squares and People # Strassen, Pl„tzen, Menschen$$eZalaegerszeg in Old Pictures,  Zalaegerszeg auf alten Bildern
000000002 314   L $$aMegyeri

 

Do you thing its possible to convert it into a format that could be inserted into a MySQL database? The datafile could be converted to CSV first.

I would need to keep the number 0000001, the fieldnumber (for ex. 100) and the data it contains.

The final product will need to be an xml file, but if they are inserted into a db, it could be easily extracted into an xml file.

 

Do you think its possible? Any ideas?

Thank you very much for any comments!

Link to comment
https://forums.phpfreaks.com/topic/270153-convert-data-and-instert-into-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.