[FX.php List] "previous" and "next" links for large array
Alex Gates
alex at gandrpublishing.com
Tue Sep 19 11:22:09 MDT 2006
The 1st email didn't make the trip right away - - - I seem to have
thrown together something that is working... but if anyone still wants
to give advice, I'd love to hear it...
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 Alex Gates
Sent: Monday, September 18, 2006 2:04 PM
To: 'FX.php Discussion List'
Subject: [FX.php List] "previous" and "next" links for large array
Hi everyone-
Jonathan has graciously helped me with this question earlier today- and
I appreciate all the help he has given me. I'm still quite confused
here, so I thought I would turn to all of you for help.
I understand this is not so much a specific fx.php question, but (I
could be wrong) I think it involves enough fx that it would just confuse
people on regular php forums.
I have a page that displays a container image, a chunk of css, email,
web address, and some pricing info.
I have some php code that puts my returned records into a table.
Here is a link:
http://www.gandrpub.com/cookbooks_for_sale/cookbooks_for_sale.php
As you can see, if you hold your mouse over the image, a tooltip of a
larger version will pop up.
However, with IE, these tooltips wont pop up until all the images have
loaded. I think there are about 93 of them on this page.
(as a side note, this uses a solution that will automatically place
these cookbooks online once they ship- and it will keep them up for 90
days)
I got to thinking that many people are still using dialup, and having
93+ cookbooks on one page is a little much. In fact, I'd like to
display 9 per page and have "next" and "previous" links.
Does anyone have any thoughts or recommendations on the best way to
break this up?
This is what I am using as my query:
<?php
$lookup=new FX($serverIP,$webCompanionPort,'FMPro7');
$lookup->SetDBData('CookbookSale.fp7','ToWeb', 'all');
$lookup->SetDBPassword('admin','admin');
$lookup->AddDBParam('Status', 'Online');
$lookup->AddSortParam('DateOrderShipped', 'descend');
$lookupResult=$lookup->FMFind();
$foundResult=$lookupResult['foundCount'];
//echo $foundResult;
//echo '<br>';
//echo $lookupResult['errorCode'];
?>
And this is how I am displaying it in the table:
<?php
$http = "http://";
$i = 0;
foreach( $lookupResult['data'] as $key => $searchData ){
$booktitle = $searchData['returnreplacesettitle'][0];
$fixedtitle = str_replace("'", "\'", $booktitle);
?>
<?php
if ($i == 0) {
print "<tr>\n";
}
?>
<td width="574" height="186" valign="top" class="phpcontent">
<center><img src="FX/image_proxy.php?FXimage=<?php echo
vignereEncryptURL($searchData['Cover'][0]); ?>" height="160" border="1"
onMouseOver="this.T_DELAY=300;this.T_WIDTH=200;this.T_LEFT
=true;this.T_TITLE='<?php echo
$fixedtitle;?>';this.T_BORDERCOLOR='#6a7d40';return escape('<img
src=\'FX/image_proxy.php?FXimage=<?php echo
vignereEncryptURL($searchData['Cover'][0]); ?>\'
height=\'350\'>')"/></center>
<?php
echo '<br><center>' . $searchData['CSSWebViewforCSS'][0] .
'</center>';
if($searchData['setEmail'][0] != "")
{ echo '<br><center>' .'Email: <br> <a href=mailto:' .
$searchData['setEmail'][0] . '>' . $searchData['setEmail'][0] .
'</a></center>'; }
if($searchData['setWebAddress'][0] != "")
{ echo '<br><center>' .'Web: <a href=' . $http .
$searchData['setWebAddress'][0] . '>' . $searchData['setWebAddress'][0]
. '</a></center>'; }
if($searchData['PriceInfo'][0] != "")
{ echo '<br><center>' . $searchData['PriceInfo'][0] .
'</center>';}
?><br></td>
<?php
$i = ($i + 1) % 3;
if ($i == 0) {
print "</tr>\n";
}
?>
<?php
}
?>
I've spent some time searching and reading about arrays, but I'm not
even to the point where I even have an idea of how to start.
Please- can anyone provide some insight?
Thanks-
Alex P. Gates
_______________________________________________
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