[support] pager_query return 300+ pages.
Michel Morelli
michel at ziobuddalabs.it
Mon Jul 6 15:06:33 UTC 2009
Hi, this is my code:
db_set_active('db1');
$query = "SELECT * from {keywords2} order by keyword_id desc";
$pager_num = 0;
$res = pager_query($query,20,$pager_num,NULL);
while ($data = db_fetch_array($res)) {
$out['table'] .= '<TR>LINEX</TR>';
}
db_set_active('default');
$out['pager'] = theme('pager',NULL,20, $pager_num);
$_SESSION['page'] = (isset($_GET['page'])) ? $_GET['page'] : 0;
return
theme_render_template(drupal_get_path('module','keywords')."/theme/listpage.tpl.php",$out);
My problem is that theme('pager',....) return me a code for 1171 pages
but my data arrive only to 837pages.
Where is the error ? keywords2 is a shared table.
M.
--
Michel 'ZioBudda' Morelli michel at ziobuddalabs.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ziodrupal.net MSN: michel at ziobuddalabs.it
JABBER: michel at ziobuddalabs.it
More information about the support
mailing list