Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Next 20"-style perl script for a database

Status
Not open for further replies.

pawnman

MIS
May 19, 2003
10
US
Here's the deal. We have a perl script that queries a database. We can pull individual records, people who have paid, etc. What we want is a way to access ALL the records, twenty at a time, using little "next 20" and "last 20" links like on a search engine. Right now, we're using a for loop to limit it to the first thirty, then you can see them all. I'd post the code, but as it accesses a database here on my PC (for now), I don't think it would be terrribly helpful. Here's the loop:
$ordercount = 0;
$search_len = length $Form{'search_name'};
if ($rerfer_code eq 'AL') {
for ($i = $orderindex; $i >= 1; $i--) {
&get_order_info_new();
&print_html_order();
$ordercount++;
if (($ordercount >= 30) && ($limit)) {
$i = 0; # get out of loop
}
+

&print_html_bottom();
}
}

Any help is appreciated.
 
A second, unrelated question. Can anyone help me puzzle out why I'm getting an error here:
[Mon May 19 15:41:17 2003] [error] [client 127.0.0.1] Can't modify numeric lt (<) in scalar assignment at c:/iperl/cgi-bin/profoundprocess.pl line 216, near &quot;&quot;mailto:$ref->{MaintEmail1}\&quot;>$ref->{MaintEmail1}</a> $ref->{MaintName1} <i>$ref->{MaintTitle1}</i> &quot;;&quot;

In theory, this should be creating an HTML link. In practice, it gives me an error. GRRRRR.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top