HTML::Pager, Navigation not working



Hi geeks,

I tried to use HTML::Pager to display my database contents. The
contents are displayed but navigation doesnot work. I have given my
code below.

----

#!/usr/bin/perl

#uses
use strict;
use warnings;
use diagnostics;
use DBI;
use CGI;
use HTML::Pager;

#Declare Variables
my $query=CGI->new();
my $count=0;

#Fetch DB Connects

my $get_data_sub = sub {
my (@return_array,@data);

#connect db & prepare stmt
my $dbHandle =
DBI->connect("dbi:mysql:tempdb","user","password") or die ("Cannot
Connect to database");
my $stmtHandle = $dbHandle->prepare("select sno,name,age,deptno
from sample1");

#fetch content from Database
$stmtHandle->execute();

while(@data=$stmtHandle->fetchrow_array())
{
push(@return_array, [@data]);
}

#disconnect db
$stmtHandle->finish();
$dbHandle->disconnect();

return \@return_array;
};

#Pager
my $pager = HTML::Pager->new(query=>$query,
get_data_callback => $get_data_sub,
rows => 11,
page_size =>5,
cell_space_color => '#000000',
cell_background_color => '#ffffff',
debug => 1
);

print "Content-Type: text/html\n\n";
print $pager->output;

---
Thanks,
yesvee

.



Relevant Pages

  • RE: Userform to add and update a table
    ... One of the most common scenarios in application development is to display ... the walkthrough illustrates many of the basic ... Access to a server with the Pubs SQL Server sample database. ... Creating the Windows Form. ...
    (microsoft.public.sqlserver.programming)
  • Re: Picture property for Access 2K forms
    ... and it works great...until you look at the database size involved. ... or by simply scaling down the image display in the ... > supported by those filters. ... To associate a graphic file with an OLE Server, ...
    (microsoft.public.access.devtoolkits)
  • Re: Unknown Maiden Name [WAS how-to ruin a perfectly good FGS]
    ... through at the beginning of my database, ... or display your information in the fields you intended for them. ... the names in a manner you didn't intend and the meaning has become ... If my data is on the Internet and people don't understand it, ...
    (soc.genealogy.methods)
  • Re: webviewer background image from filemaker container field
    ... It is not elegant or simple the moment you factor in how a webviewer ... passes the result back to FM to display. ... info out of the schema of the database. ... And the quality of advice in books and formal filemaker education is ...
    (comp.databases.filemaker)
  • Re: webviewer background image from filemaker container field
    ... It is not elegant or simple the moment you factor in how a webviewer ... passes the result back to FM to display. ... info out of the schema of the database. ... And the quality of advice in books and formal filemaker education is ...
    (comp.databases.filemaker)