loops and arrays

From: Date: Thu, 07 Sep 2000 18:17:37 +0000
Subject: loops and arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-15778@lists.php.net to get a copy of this message
I have a function that has a while loop that returns an array and from that array I do several things. One of them is to INSERT into a table. the $queryStatus seems work ok but does several odd things Firstly it adds Three extra records to the table with some of the variables missing? Secondly, when executed it appends the variable $SPRecordSequence to itself on each loop so that the end result is like below where I have echoed the query INSERT INTO Status (RecordType, SPRecordSequence, WNOFileSentDate, WNOFileSentSequenceNumber) VALUES ('10','000000109','20000908','0005') INSERT INTO Status(RecordType, SPRecordSequence, WNOFileSentDate, WNOFileSentSequenceNumber) VALUES('10','000000110','2000090820000908','0005') INSERT INTO Status (RecordType, SPRecordSequence,WNOFileSentDate,WNOFileSentSequenceNumber)VALUES('10','000000111','200009082000090820000908','0005') INSERT INTO Status (RecordType,SPRecordSequence, WNOFileSentDate,WNOFileSentSequenceNumber)VALUES('10','000000112','20000908200009082000090820000908','0005') INSERT INTO Status (RecordType,SPRecordSequence, WNOFileSentDate,WNOFileSentSequenceNumber)VALUES('10','000000113','2000090820000908200009082000090820000908','0005') As you can see the variable is waaay out of shape bye the fifth time the function is at http://www.oceania.net/kevin/Transfer.phps All replies gratefullly recieved Kevin

« previous php.general (#15778) next »