Re: sql looping problem??

From: Date: Wed, 04 Apr 2001 03:13:42 +0000
Subject: Re: sql looping problem??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46957@lists.php.net to get a copy of this message
It's probably not the cause of your problem (I know little to nothing about Interbase), but why the if... loop in your code? Your if: if ($val < $NumCases) does the same thing as your for: for ($val = 0; $val < $NumCases; ++$val) Unless of course you wanted it that way... -- Plutarck Should be working on something... ...but forgot what it was. ""Wade Halsey"" <whalsey@btech.co.za> wrote in message news:002e01c0bc4d$2ebfcf80$256410ac@wadeh... Hi I have the following code /*number of times to run*/ $NumCases = $HTTP_POST_VARS['txtNumCases']; /*execute the sql*/ $sqlLargeRequest = sqlexecute($LargeRequest); for ($val = 0; $val < $NumCases; ++$val){ if ($val < $NumCases) { $details = sqlFetchObject( $sqlLargeRequest ); $AccNo = $details ->ACCNO; etc etc It executes the correct number of times but doesnt move to the next record.Im using an Interbase DB. Any ideas?? TIA Wade

« previous php.general (#46957) next »