.NET Accounting / Bookkeeping AJAX ASP Audio Services C/C++ CMS Cold Fusion Copywriting CSS Data Entry Data Processing Delphi Electronics Engineering Excel Flash Graphic Design Handheld J2EE Java Javascript Joomla JSP LDAP Legal Advice Link Building Links Linux Logo Design Market Research Marketing MS Access MS SQL mSQL Multimedia MySQL Oracle OsCommerce PDA Perl/CGI Photography Photoshop PHP PostgreSQL Project Management Proofreading Python Ruby/Ruby on Rails Script Installation Security SEO SQL System Admin Telemarketing Training Translation Video Services Virtual Reality Visual Basic Web Promotion Website Design Website Security Windows Wireless Wordpress Writing XHTML XML
Budget: N/A
Category: ASP, C/C++, Perl/CGI, PHP, MySQL
I need a script or process that can read / parse a txt file and transfer into two mysql tables, with the ability to perdiodically run the process again to update the data.
The txt file is attached to the project.
As an example, one entry is:
RIP Salachia (99627)
Location: Yank (146) on Mobile Bay (676)
Hiports: 1
Patch Price: 50
Orbital Docks: 200
Maintenance Complexes: 6
Sell Sell Buy Buy
Quantity Price Item Quantity Price
0 0.00 Teleporter Module (425) 60 200.00
0 0.00 Cargo Hold (180) 100 180.00
0 0.00 Patch (45) 500 40.00
0 0.00 Patch mkII (46) 500 55.00
I would need the following data, delimited by commas below, inserted into one table
RIP, Salachia, 99627, Yank, 146, Mobile Bay, 676
The next four or five optional (not always present) lines, until a blank line could be placed in a text field
"Hiports: 1
Patch Price: 50
Orbital Docks: 200
Maintenance Complexes: 6"
Then each of the items entered into another table, each with the previous numerical identifiers of 99627, 146 and 676 to group and filter them later; eg:
"99627, 146, 676, 0, 0.00, Teleporter Module, 425, 60, 200.00"
The server has cgi, php and sunsoft asp available along with a mysql database. Though I'm not adverse to the idea of a stand alone windows program if this is needed.
Additional Info (Added 11/20/2008 at 8:05 EST)...
Attached file: markets.txt
File info: text file