Here is what our company uses to do the page division on adoptablekids.com I
have used it for a few other applications with minimum changes
This code would give you five per page.
<sql detail=rhs pgsize="5">
select * from profile order by id DESC
</sql>
<perl>
return if ({sys:num_pages} <= 1);
my $pg;
if ({sys:prevpg_link})
{
wgprint "";
}
for ($pg = 1; $pg <= {sys:num_pages}; $pg++)
{
if ($pg == {sys:page_num})
{
print "$pg\n";
}
else
{
print "<a href=child.wga?dbpg=$pg\>$pg</a>\n";
}
}
if ({sys:nextpg_link})
{ print ""; }
</perl>
-----Original Message-----
From: Matteo Dell'Orto [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 10:32 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Two query issues -- need help
Hi all, I have two little problems:
1.In a query, I get errors when a record's field contains the '
character. In fact the query starts like <! sql query "insert into dbase
values ('@qfield1', '@qfield2'...).
2.I need to split query results in multiple pages (e.g. with a next
button) so that my output is better presented, please give an advice.
Please help me!!! Thanks in advance,
Teo
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php