Jump to content

Archived

This topic is now archived and is closed to further replies.

jcstanley

Limit items per page

Recommended Posts

Hi

I was wondering if you guys could point me in the right direction.

I currently have a page that displays every news item, but it is now getting very slow to load!

I was thinking of maybe displaying, say 10 items per page, but i am not quite sure how to do this.

Any help would be appreciated.

Thanks

Share this post


Link to post
Share on other sites
Give this PHPFreaks [url=http://www.phpfreaks.com/tutorials/73/0.php]tutorial[/url] a try...

Regards
Huggie

Share this post


Link to post
Share on other sites
Thanks, that tutorial really helped

I have just one question.  When displaying the results, how would i get it to display a picture?

It currently shows the TITLE and DESCRIPTION fine but i can't seem to figure out how to display a picture.

Here is my code:


echo'<font face="Tahoma" style="font-size: 11pt" color="#FFFFFF">'; echo $row['title']."</font></b></td>";

    echo'<td width="195" style="border-style:none; border-width:medium; " height="8" rowspan="2" valign="top">';

echo'<p align="center">'; echo '<img border="0"'; echo $row['picture']."</td>";
  echo'</tr>';
  echo'<tr>';
  echo'<td width="680" style="border-style:none; border-width:medium; " height="1">';

echo'<p style="margin-top: 0; margin-bottom: 0"><font face="Tahoma" size="2">'; echo $row['description']."</font></td>";

Share this post


Link to post
Share on other sites
you have to give the source for the picture. If the field "picture" contains the link then you can do it like so

[code]  echo'<p align="center">';
echo '<img src="'.$row['picture'].'" border="0"'></td>';[/code]

If it does not contain the link, Where does it come from??
Ray

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.