|
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
Navigation:
[Reply to this message]
|