|
Posted by joanna on 10/28/07 10:47
I'm having some difficulty paginating from the $_GET variable,
because in this instance the string being passed is of a group by
query (one letter). Currently I'm limiting the results using limit,
Here's what I currently have and it works just fine at displaying, I
just need to add pagination.
<?php
if( !isset( $_GET['title'] ) )
{
print 'No Record was Selected';
}
else
{
$query = mysql_query("SELECT ID,Title FROM table WHERE Title LIKE
'" . $_GET['title'] . "%' LIMIT 0, 100")or die(mysql_error());
}
if( mysql_num_rows($query) == 0 )
{
echo 'Sorry no records';
}
else
{
while($row = mysql_fetch_array($query ))
{
$title=htmlspecialchars($row['Title']);
echo "<td><a href=\"page2.php?title=" .$title. "\"> $title</a></td>
\n<br>";
?>
Navigation:
[Reply to this message]
|