I have a server that is running PHP 4 and MySql 4. I have a supplier that I use that will generate part numbers, description, qnty, and pricing for price quotes. They will export the quote to a csv file for excell. I want to take that file and put it into a MySql table with a unique Quote ID number (Company name would not work since there could be many quotes for each company) so I can retrieve it later using Open Office Base. The file I get will have some extra information that I don't need. Here is a sample of the file I will get:
ABC Company
Part Number Description Total Qty. Unit Price Total Price
Inter-Tel CS-5200 Base Packages
580.9001 Inter-Tel CS-5200 System with 5 Model 8520 Digital Endpoints 1 $5,265.00 $5,265.00
- Digital Endpoint Module (DEM16) (580.2200) 1
- Inter-Tel 5000 BVM License Single Port (840.0411) 4
- Inter-Tel 5000 Base System Chassis (580.1000) 1
- Inter-Tel CS-5200/5400 Compact Flash Card - 512 MB (841.0274) 1
- Inter-Tel DE-5200 Digital Expansion Interface (DEI) (580.1001) 1
- License Inter-Tel 5000 Software v1.2 (840.0456) 1
- License Inter-Tel 5200 Base (840.0238) 1
- License Key for Inter-Tel 5000 (841.0219) 1
- License for First Digital Endpoint Interface to Operate (840.0409) 1
- Model 8520 - 2 Line Display Digital Endpoint (550.8520) 5
- Processor Module 1 (PM-1) (580.2000) 1
- Software CD for Inter-Tel 5000 v1.2 (841.0361) 1
- Software Site License Kit (999.9000) 1
Inter-Tel 5000 Digital Components
813.1814 DEM Cable Adapter (quad RJ-45 to Amp) 15ft 1 $58.50 $58.50
Model 8000 Series
550.8416 Model 8416 - 16 Key Mini-DSS 1 $175.50 $175.50
550.8560 Model 8560 - 6 Line Display Digital Endpoint 2 $497.25 $994.50
Trunk Interfaces
580.2300 Loop Start Module (LSM-2) 1 $269.10 $269.10
580.2304 Quad Loop Start Module (LSM-4) 1 $497.25 $497.25
Technical Literature
550.8112 Model 8520 Phone User Guide 5 $0.00 $0.00
550.8113 Model 8560/8660 Phone User Guide 2 $0.00 $0.00
Inter-Tel 5000 Technical Information
580.8001 Administrator's Guide Inter-Tel 5000 1 $29.25 $29.25
Rack Mount Solutions
902.0633 APC 750 VA RACKMOUNT 1 $723.45 $723.45
Additional/Misc. Items
835.2950 Inter-Tel Model 8000 Series Interactive User Guide CD 1 $1.95 $1.95
Total: $8,014.50
The text in RED I need to delete from the file. I would also need to delete the $ from all pricing in order to get it into MySql as a float type of field. Notice there is an Apostrophe in the description of the Administrator's Guide. The section in green needs to stay together because it is a Kit. The first line is the kit and the rest are what makes up the kit. The user will D/L the file to his PC and then will need to run this PHP script to get it into the MySql DB. Any help would be Greatly Appreciated!
Thanks