Hi Sean,

The max_rows_returned is set in the setup file, but it simply determines the number of rows per page. Then when it reads line by line that there are more than the predetermined maximum rows per page, it prints the warning that the number of rows have been exceeded, and suggests refining the search parameters.

Problem is that I want to be able to pick up all the rows although not all on the same page, there must be some way of getting it to change to creating a new page with the next line read exceeding the max rows, and so on till the search parameter is filled. Then placing the link to the next set of "25" for instance at the bottom of the page instead of suggested that the search be refined.

You can see this in operation at http://www.etheria.com.au/cgi-bin/web_store.pl?

Just in case looking at it working helps. I don't understand what happens to create the next couple of pages.

thanks in advance

cat
----- Original Message ----- From: "Sean Davis" <[EMAIL PROTECTED]>
To: "Literatecat" <[EMAIL PROTECTED]>
Sent: Tuesday, January 04, 2005 9:47 PM
Subject: Re: Database Rows Returned



Cat,

For whatever reason, the original developer felt it necessary to place a limit on the number of rows. It seems that the important variable governing that number is $sc_db_max_rows_returned. You could simply set that to a larger number. Will that do what you need?

Sean

On Jan 3, 2005, at 10:24 PM, Literatecat wrote:

Thanks for the prompt response Sean

Hopefully this will provide all that is needed.

 }

 ($status,$total_row_count) = &submit_query(*database_rows);

sub check_db_with_product_id {
 local($product_id, *db_row) = @_;
 local($db_product_id);

open(DATAFILE, "$sc_data_file_path") ||
   &file_open_error("$sc_data_file_path",
     "Read Database",__FILE__,__LINE__);

sub submit_query
{
 local(*database_rows) = @_;
 local($status);
 local(@fields);
 local($row_count);
 local(@not_found_criteria);
 local($line); # Read line from database

local($exact_match) = $form_data{'exact_match'};
 local($case_sensitive) = $form_data{'case_sensitive'};

while(($line = <DATAFILE> ) &&
       ($row_count < $sc_db_max_rows_returned + 1))
 {
   chop($line); # Chop off extraneous newline

@fields = split(/\|/, $line);

$not_found = 0;
   foreach $criteria (@sc_db_query_criteria)
   {
     $not_found += &flatfile_apply_criteria(
$exact_match,
$case_sensitive,
*fields,
$criteria);
   }

if (($not_found == 0) &&
       ($row_count <= $sc_db_max_rows_returned))
   {
     push(@database_rows, join("\|", @fields));
   }

if ($not_found == 0) {
     $row_count++;
   }
 } # End of while datafile has data

if ($row_count > $sc_db_max_rows_returned) {
   $status = "max_rows_exceeded";
 }

return($status,$row_count);

} # End of submit query

I haven't included the Close (datafile) etc Just the code pertaining to the query that I can find. It is all in different files but mainly in one library.

Hope this helps.

thanks in advance

cat



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to