[FX.php List] Newbie Needs Help
Michael Layne
fx at 9degrees.com
Tue Oct 18 17:08:13 MDT 2005
alternate colors...
$counter = 1;
foreach ($r['data'] as $l) {
if ($counter % 2 == 0) {
echo "<tr class=\"even\">\n"; // CSS rule makes background-
color (transparent/#ffffff)
} else {
echo "<tr class=\"odd\">\n"; // begin row 2 CSS rule makes
background-color (#f3f3f3/whatever)
}
<td>...data...</td>
<td>...data...</td>
</tr>
++$counter; // The '++' operator increments the
argument it accompanies.
}
I usually just grab the 'returnedCount'
query...
$q = new FX($ip, $port);
$q->SetDBData($fmdb,$lay);
$q->AddDBParam('sessionID',session_id());
$r = $q->FMFind();
text...
if ($r['foundCount'] <= 0) {
echo "<p>Sorry, no records found....</p>\n";
}
HTH,
Michael
Michael Layne : 9 degrees development : www.9degrees.com :
404.226.7835
On Oct 17, 2005, at 1:36 PM, Peter Bates wrote:
> Brief about myself: I've just started using FX.php, (I was using
> FileMaker's XSLT), for my custom web publishing. My knowledge of
> php is at the learning stages too. I have FX.php in 8 Hours, (book
> and video series), and FXForge 2.0.
>
> I have been able to understand most of the code that is produced by
> FXForge, but when it comes to the code that is provided by Chris
> Hansen's examples that he provides, I quickly get lost, since his
> code is structured so much differently that the FXForge-produced
> code. I've been trying for weeks now to integrate two features that
> he provides in his index.php code into my search_results.php code
> without any success. If anyone could please help me understand how
> to do the following two items, I would be eternally grateful.
>
> In his Book List Example, he shows:
> 1. The data rows displayed in alternating colors.
> 2. A "plain english" message is returned when no records are found.
>
> That's it. I can see where in his code that he does this, but I
> just don't understand how to get the same results with my code.
> This is the only bit that I lack to consider my code to be
> complete. The URL for this is at: http://fmcwp.sjcpl.org/tribindex/
> index.php
>
> Peter Bates
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20051018/5d3acf8f/attachment.html
More information about the FX.php_List
mailing list