Reply to Re: Paginate from group by

Your name:

Reply:


Posted by bmichel on 10/28/07 11:53

If I understand your problem correctly; you're having problem
distributing the SQL query on several pages.

By using ORDER BY, you can keep track of what was displayed already.

SELECT ID,Title
FROM table
WHERE Title LIKE '" . $_GET['title'] . "%'
ORDER BY title
LIMIT 0, 100

Depending on how many results you want to display per page (let's say
100). You can modify the LIMIT. That is for page 1 'LIMIT 0, 100', for
page 2 'LIMIT 100, 200' and so on

>> echo "<td><a href=\"page2.php?title=" .$title. "\"> $title</a></td>
This here looks like a bad design idea. You should instead have a
variable (which you can pass through $_GET), which tells you which
page you're on.

$params = "?title=" . $title . "&page=" . $page;

Hope this helps

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация