|
Posted by Willem Bogaerts on 05/14/07 10:01
> your idea/question to read from csv and update the table is the right
> way.
>
> Open your csv file and read each line using a loop. Check inside your
> loop, if an entry in the database exists. if so update it, otherwhise
> continue the loop or insert an entry.
As an alternative, you can define a (temporary) table based on your CSV
file in MySQL (you'll have to upload the csv file to the database
server), and use an update statement. MySQL has a CSV engine for these
purposes. If this is a regular action and not a one-time only action,
you'll be better of using PHP though.
Best regards,
--
Willem Bogaerts
Application smith
Kratz B.V.
http://www.kratz.nl/
Navigation:
[Reply to this message]
|