Page 1 of 1

<pagelinks> issue

Posted: Mon Mar 26, 2001 4:23 pm
by chand012
The <pagelinks> function is not working as expected in a particular database.

The function runs:

<sql row skip=$skip max=10 "select rec_id, firstname, middlename, lastname, birthplace, occupations, residence, birthdate from btv
where lastname like $lname and
birthplace like $bplace and
occupations like $occ and
residence like $res and
interviewers like $iviewers and
birthdate >= $lowyear and birthdate <= $highyear
order by lastname, firstname, middlename">
<results_row>
</sql>
<pagelinks>

The skip variable $skip is set to 0 in <main> and is exported url. The query works fine, but <pagelinks> is not calculating correctly. It only bumps up $skip by one for each link (instead of 10).

What could be going on?

Thanks,
David

<pagelinks> issue

Posted: Mon Mar 26, 2001 4:57 pm
by Kai
Print $skip just before the <SQL> and again just before calling <pagelinks>; make sure it's not changed.

If another <SQL> statement is called by <results_row> that may change the page size since it defaults to the MAX of the last <SQL>. If that's the case set PGSZ=10 as an option to <pagelinks>.

<pagelinks> issue

Posted: Tue Mar 27, 2001 4:59 pm
by chand012
Setting the pgsz option fixed it. Thanks. --David