|
Posted by Nicolas Verhaeghe - White Echo on 10/24/05 19:35
>> hello,
>>
>> i have made a script to read/add and update rows in an csv file.
>> it works fine.
>>
>> but when i change an existing row i want the original row to disapear.
>> now i get two rows: the original one en the changed one.
>>
>> so my question is: how can i delete a row in a csv file?
>>
>
> open source file, create a temporary file. Copy any line to the temporary
> file but the one you want to delete. Afterwards, move the temporary files
> to the original source file.
>
> Regards
> Stefan
Tricky if more than one user at a time... I would have the CSV file imported
into MySQL (or whatever database server you use), then once the data is
manipulated, export to the CSV. Or export to CSV on demand, or on schedule.
Navigation:
[Reply to this message]
|