[FX.php List] Problems on a looping edit
Gareth Evans
gareth.evans at schawk.com
Thu Apr 2 14:06:24 MDT 2009
It could be my eyes but it looks like you're loop will only run 199 times
the way you have it if $foundCount = 200. You may want to try:
while($x <= $foundCount) {
...
}
--
GARETH EVANS
> From: John Funk <jfunk at criticalsolution.com>
> Reply-To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Date: Thu, 02 Apr 2009 13:22:09 -0500
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Subject: [FX.php List] Problems on a looping edit
>
> I have a page with a list of check boxes, when the page gets submited the
> data is read from the request and written to FileMaker. So far so good. But
> for some unknown reason the FMEdit() function stops short of the
> foundcount.( I need to edit as many as 200 in a loop)
> When I comment out the lines that perform the edit, the page runs complete.
> Is there a time out that I need to change or is there something wrong with
> my code:
> $foundCount='0';
> $groupSize='1';
>
> $foundCount = $_REQUEST["foundCount"];
> $x = 1;
> while ($x < $foundCount)
> {
> $myRecID = $_REQUEST["recID_".$x];
> $M = $_REQUEST["M".$x];
> $D = $_REQUEST["D".$x];
> echo $myRecID." ".$M." ".$D."<br>";
> $request = new FX($ServerIP, '80', 'FMPro7');
> $request->SetDBData($db,'web_products_selected',$groupSize);
> $request->SetDBUserPass($fmAccount, $fmPass);
> $request->AddDBParam('-recid', $myRecID);
> $request->AddDBParam('Manufacturer', $M);
> $request->AddDBParam('Distributor', $D);
> $result = $request->FMEdit();
> echo $myRecID." ".$M." ".$D."<br>"; // this line is for debugging
> $x++;
> }
>
> Any ideas?
> John Funk
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list