[FX.php List] simple problem - but stuck

Derrick Fogle derrick at fogles.net
Wed Oct 25 11:38:38 MDT 2006


Ha ha... yes, anytime you need someone to miss the problem but spot  
the red herring, just let me know.  ;-)

On Oct 25, 2006, at 9:49 AM, Alex Gates wrote:

> Excellent.  Thank you very much, Chris... that did it.
> Thank you, too, Derrick - -
>
> I wont do that again!
>
> Thank you.
>
> Alex P. Gates
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Chris  
> Hansen
> Sent: Wednesday, October 25, 2006 9:44 AM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] simple problem - but stuck
>
> Alex,
>
> Try removing the ';' from the end of this line:
>
> foreach( $lookupResult['data'] as $key =>$searchData);
>
> HTH
>
> --Chris Hansen
>    FileMaker 7 Certified Developer
>    Creator of FX.php
>    "The best way from FileMaker to the Web."
>    www.iViking.org
>
>
> On Oct 25, 2006, at 8:32 AM, Alex Gates wrote:
>
>> Hi Everyone -
>>
>> I've had this problem before - - but I don't know how I went about
>> fixing it.
>>
>> For some reason, my search will only return the last record when I  
>> try
>> to do a Findall.
>>
>> Here is the code I am using - - I am trying to display it in a table,
>> but I only get the latest record.
>> I'm sure it's a simple solution - but I've run out of ideas.
>>
>> <table border="1">
>> <tr>
>> <td><center><b>TimeStamp</b></center></td>
>> <td><center><b>Username</b></center></td>
>> <td><center><b>Web Account #</b></center></td>
>> <td><center><b>Browser</b></center></td>
>> <td><center><b>Version</b></center></td>
>> <td><center><b>Resolution</b></center></td>
>> </tr>
>> <?php
>> 	$lookup=new FX($serverIP,$webCompanionPort,'FMPro7');
>> 	$lookup->SetDBData('Web_Cookbook_Dev.fp7','LoginHistory');
>> 	$lookup->SetDBPassword('xxxxxx','xxxxxxxx');
>> 	$lookupResult=$lookup->FMFindall();
>> 	$foundResult=$lookupResult['foundCount'];
>>
>> echo "Error Code: " . $lookupResult['errorCode'];
>> echo "<br>Found Count: " . $foundResult;
>> ?>
>> <?php
>> foreach( $lookupResult['data'] as $key =>$searchData);
>>   {
>> $TimeStamp = $searchData['TimeStamp'][0];
>> $Username = $searchData['Username'][0];
>> $WebAccountNumber = $searchData['WebAccountNumber'][0];
>> $Browser = $searchData['Browser'][0];
>> $Version = $searchData['Version'][0];
>> $Res = $searchData['Res'][0];
>>
>>     echo "<tr><td>";
>>     echo $TimeStamp;
>> 	echo "<td>" . $Username . "</td>";
>> 	echo "<td>" . $WebAccountNumber . "</td>";
>> 	echo "<td>" . $Browser . "</td>";
>> 	echo "<td>" . $Version . "</td>";
>> 	echo "<td>" . $Res . "</td>";
>> 	echo "</tr>";
>>   }
>> 	?>
>> 	
>>   </table>
>>
>> What am I doing wrong?  What causes only the last record to be
>> returned??
>>
>> Thanks for your help...
>>
>> Alex
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


Derrick Fogle
derrick at fogles.net





More information about the FX.php_List mailing list