<pagelinks> issue

Post Reply
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

<pagelinks> issue

Post 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
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

<pagelinks> issue

Post 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>.
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

<pagelinks> issue

Post by chand012 »

Setting the pgsz option fixed it. Thanks. --David
Post Reply