Reply to Re: deleting row in csv file

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация