HI All
I am trying to write a PHP page that I can use to update and and new items to a mysql database.
the layout of the file is as follows
Position 1 to 10 - partn Number
Position 11 to 40 - Discription
Position 41 to 49 - Price (decimal 7,2)
Position 50 to 58 - weight (decimal 5,4)
Position 59 to 67 - Price (decimal 7,2)
Position 68 to 70 - currancy
I have created the folloing table in My SQL
CREATE TABLE bsa_std_price (
Part_Number varchar(10) NOT NULL default '',
Description varchar(30) NOT NULL default '',
Transfer_Price decimal(9,2) unsigned zerofill NOT NULL default '0000000.00',
Weight decimal(9,4) NOT NULL default '00000.0000',
End_User_Price decimal(9,2) NOT NULL default '0000000.00',
Currancy char(3) NOT NULL default '',
PRIMARY KEY (Part_Number)
)
This is a line from the file
00270000 NMACTRON 1ST + 2ND GLUE TRACK 003198270000010000004177920CHF
This is all on one line
I need to write a PHP file that will read this file and then either add the new items or update any old ones.
Where would I start
Thanks
Martin