You are here: Re: deleting row in csv file « All PHP « IT news, forums, messages
Re: deleting row in csv file

Posted by Ted Ferenc on 10/25/05 11:28

The old fashioned way was to have a 'deleted' flag in the CSV file, instead
of removing a line simply set the deleted flag, i.e. one field, when you
parse the CSV file look for the deleted flag, if set the line is 'deleted'
so ignore it.

Once in a while go through the CSV file and physically remove all rows
flagged as deleted, if your CSV file is getting too big.

Now the next problem is what if 2 people are writing to the file at the
'same time'?

--

Ted Ferenc
This address used is maintained only for newsgroup posting.
Mail sent there may not be read by me for several days.
"nescio" <nescio@nescio.nl> wrote in message
news:435cea75$0$305$19deed1b@news.inter.NL.net...
> 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?
>
>
> thanks
>
>

 

Navigation:

[Reply to this 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

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