PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Pager (with search variable in the query)

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures
View previous topic :: View next topic  
Author Message
wmak



Joined: 24 Jan 2007
Posts: 2

PostPosted: Wed Jan 24, 2007 12:25 pm    Post subject: Pager (with search variable in the query) Reply with quote

Hi all,

I like to use the pager to do the pagination with the $search_user variable in my query. But when I jump to another page, it cant get the $search_user variable. And it gets all the data. Is there a way to append it in the URL after the pageID.

For example,
$query = Select * from Company where User = '$search_user';
$row = $dbh->getAll($query);
$params = array("mode" => "Sliding",
"PerPage" => 20,
"append" => true,
"clearIfVoid" => false,
"useSessions" => true,
"closeSession" => true,
"itemData" => $row,
"showAllText" => "All"
);
$search_user is passed after the form is submitted

Is the following possble? How?
http://www.company.com/showuser.php?pageID=2&User=$search_user

If not, any other ways?

Thanks in advance,
Wilson
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1003

PostPosted: Wed Jan 24, 2007 1:19 pm    Post subject: Reply with quote

The 'extraVars' option should allow you to do what you want:
http://pear.php.net/manual/en/package.html.pager.intro.php
Back to top
View user's profile Send private message
wmak



Joined: 24 Jan 2007
Posts: 2

PostPosted: Thu Jan 25, 2007 5:06 am    Post subject: Reply with quote

Got it! Thank You!
I tried to look for the info for the pager packer here before. But I didnt awear that pager is under the HTML package.

Thanks anyway!
Wilson
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1003

PostPosted: Thu Jan 25, 2007 11:43 am    Post subject: Reply with quote

wmak wrote:
I tried to look for the info for the pager packer here before. But I didnt awear that pager is under the HTML package.


You can click on the "Documentation" tab on Pager package page (http://pear.php.net/package/Pager) and then on the "End-user Documentation" to get directly to the manual pages for Pager.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software