hello
i have a text file with TAB separation.
in this file, i have some products with lets say: RefNr. / Name / Option / Amount
when i open it i see:
SOURCE:
RefNr. Name Option Amount
001 Product 1 Black 2
001 Product 1 Black 1
001 Product 1 Black 0
001 Product 1 Green 1
001 Product 1 Green 4
001 Product 1 Green 1
002 Product 2 Black 3
002 Product 2 Black 1
002 Product 2 Black 1
002 Product 2 Green 2
002 Product 2 Green 2
002 Product 2 Green 0
etc etc
do you nkow a way to get this instead, after running a script for instance (my question is “how does the script should look like”!):
RESULT:
RefNr. Name Option Amount
001 Product 1 Black 3
001 Product 1 Green 6
002 Product 2 Black 5
002 Product 2 Green 4
(i could save this text file first to EXCEL if it helps.)
once i’ve done it, i’ll have in a second step to “compare” this file to a mySQL Database.
but in the selected DB table, i won’t have exactly the same structure.
i mean in my text file i’ll have for instance not only RefNr. / Name / Option / Amount but
RefNr. / Name / Option / Amount / Description / DeliverDate / ImgName
and in my table in the DB i’ll have:
RefNr. / Name / Option / Amount / DeliverDate / Info
i will need to compare the amounts between ‘RESULT’ and my mySQL table, to get the amount which changed updated in my DB table.
any idea welcome... even if the process is not automated and if i need to do everything manually in phpMyAdmin for instance (i do not even know how to do it in phpMyAdmin!).
many thanx in advance for any help!
batchas
i have a text file with TAB separation.
in this file, i have some products with lets say: RefNr. / Name / Option / Amount
when i open it i see:
SOURCE:
RefNr. Name Option Amount
001 Product 1 Black 2
001 Product 1 Black 1
001 Product 1 Black 0
001 Product 1 Green 1
001 Product 1 Green 4
001 Product 1 Green 1
002 Product 2 Black 3
002 Product 2 Black 1
002 Product 2 Black 1
002 Product 2 Green 2
002 Product 2 Green 2
002 Product 2 Green 0
etc etc
do you nkow a way to get this instead, after running a script for instance (my question is “how does the script should look like”!):
RESULT:
RefNr. Name Option Amount
001 Product 1 Black 3
001 Product 1 Green 6
002 Product 2 Black 5
002 Product 2 Green 4
(i could save this text file first to EXCEL if it helps.)
once i’ve done it, i’ll have in a second step to “compare” this file to a mySQL Database.
but in the selected DB table, i won’t have exactly the same structure.
i mean in my text file i’ll have for instance not only RefNr. / Name / Option / Amount but
RefNr. / Name / Option / Amount / Description / DeliverDate / ImgName
and in my table in the DB i’ll have:
RefNr. / Name / Option / Amount / DeliverDate / Info
i will need to compare the amounts between ‘RESULT’ and my mySQL table, to get the amount which changed updated in my DB table.
any idea welcome... even if the process is not automated and if i need to do everything manually in phpMyAdmin for instance (i do not even know how to do it in phpMyAdmin!).
many thanx in advance for any help!
batchas
Kommentar