RE: how can I delete a record from txt file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



well you gotta make sure that the record that you are deleting is not being
used by another program, you will have to look at the other program and
determine when they run, it will be difficult to automate that.

to physically delete a record you have to find the id of the record ( i
presume that each record is stored with a primary (unique) key, and secondly
each record has its own row. to delete it you loop through the rows and
every row check if the key to be deleted is the key of that row, if so then
delete the row,  you will need to use some string functions mid, left right,
instr etc... see the documentation for that. I havent given you any code but
thats how you would do it in theory just use the manual to develop what ive
said into php code.

good luck

-----Original Message-----
From: Gamze Basaran [mailto:gbasaran@xxxxxxxxxxxxxxxxx]
Sent: Thursday, January 22, 2004 10:46 AM
To: php-db@xxxxxxxxxxxxx
Subject:  how can I delete a record from txt file


Hi;

I take users from Active Directory with ldap functions and put them in a
list menu. I have got two txt files. One of them hold the users which have
got internet access and one of them holds the users which have got speedily
internet access. Also may be a third file that hold the users which have got
limited internet access.

In my program I must write the selected users to these files. And may be
sometimes I must delete some users from these files. How can delete a user
from txt file. These files are also in use with some other programs.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--------------------------------------------------------------------
Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux