Re: [PHP] Can I delete / update line inside the file ?

2002-05-23 Thread Miguel Cruz
On Thu, 23 May 2002, Manisha wrote: I have one file with following format No. | Name | Email | status 1 | Manisha | [EMAIL PROTECTED] | Pending 2 | Neha | [EMAIL PROTECTED] | Reject 3 | Aish | [EMAIL PROTECTED] | Pending ... I want to update status change against that line. e.g

Re: [PHP] Can I delete / update line inside the file ?

2002-05-22 Thread Bogdan Stancescu
Get a database working! That's definitely worth investing some time in - apart from the obvious speed avdantages, you'd learn a lot. About your question, AFAIK you can only do it by reading from one file and writing to a temp file, then moving the temp over the original - pretty clumsy, if

Re: [PHP] Can I delete / update line inside the file ?

2002-05-22 Thread Manisha
It is not possible to get the database as client is not ready for that (Can't help it - you know). I am thinking - I will take the data in an array first - change it and flush back to file again. Is there any command to flush back the whole array in to file (each array element will become one

RE: [PHP] Can I delete / update line inside the file ?

2002-05-22 Thread John Holmes
may want to look into locking the file. www.php.net/implode www.php.net/file www.php.net/flock ---John Holmes... -Original Message- From: Manisha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 10:08 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Can I delete / update line

Re: [PHP] Can I delete / update line inside the file ?

2002-05-22 Thread Philip Olson
I am thinking - I will take the data in an array first - change it and flush back to file again. Is there any command to flush back the whole array in to file (each array element will become one line) or do I need to write one by one line ? see file() and implode() where you'll implode

Re: [PHP] Can I delete / update line inside the file ?

2002-05-22 Thread Manisha
Thanks to all to give me good start. I will try out now. Manisha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php