[FX.php List] simple problem - but stuck
Alex Gates
alex at gandrpublishing.com
Wed Oct 25 08:43:29 MDT 2006
My Found Count ($foundResult) is 3 and my error code is 0.
I closed that <td> tag too just in case... but it still only displays
the latest record.
Alex P. Gates
G&R Publishing Co.
507 Industrial Street
Waverly, IA 50677
Ph: 319-352-5391 x 319
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Derrick Fogle
Sent: Wednesday, October 25, 2006 9:40 AM
To: FX.php Discussion List
Subject: Re: [FX.php List] simple problem - but stuck
What is your "$foundResult" variable returning? Your code is missing
a closing </td> tag after outputting $TimeStamp, but that shouldn't
cause the problem you're seeing.
On Oct 25, 2006, at 9: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
Derrick Fogle
derrick at fogles.net
_______________________________________________
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