Code: Select all
$fd = fopen ("d:\active.txt", "r");
while (!feof ($fd)) {
$line= fgets($fd, 4096);
$MyArray=explode("|", $line);
$LastName=addslashes($MyArrayї0]);
$FirstName=addslashes($MyArrayї1]);
$MiddleName=$MyArrayї2];
$SSN=$MyArrayї3];Then I have a table Active with the same fields:
LastName, FirstName, MiddleName, SSN
And an Inactive table exactly the same
LastName, FirstName, MiddleName, SSN
This text file is inserted into the Active table.
The reason is, is that this text file is updated every 2 weeks, and only current data should be maintained, with an archive for old data. So again, I want to move data from the Active table to the Inactive table which is not present in the text file. Can anyone give me an idea on how to do this??? Hope all this makes sense, if not let me know and ill try to clarify it more. Thanks