Jump to content

Limit items per page


jcstanley

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
Link to comment
https://forums.phpfreaks.com/topic/23763-limit-items-per-page/
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>";

Link to comment
https://forums.phpfreaks.com/topic/23763-limit-items-per-page/#findComment-108535
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
Link to comment
https://forums.phpfreaks.com/topic/23763-limit-items-per-page/#findComment-108542
Share on other sites

Archived

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

×
×
  • Create New...

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.