Closed (won't fix)
Project:
Drupal core
Version:
5.1
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2007 at 07:16 UTC
Updated:
21 Jun 2011 at 23:32 UTC
I can't believe I spent three hours trying to find out why the pager links were not showing up at the bottom of the table! In Drupal 4.7, I did not have to have SQL keywords (such as SELECT, FROM) in uppercase. Apparently, now I have to do it in Drupal 5.0. It would be nice, at least, to get an error message somewhere that says I had made an 'error' in my sql statement. The code below will fail with lowercase select,from but will work if changed to SELECT,FROM.
<?php
$header = array(
array('data' => t('id'), 'field' => 'id'),
array('data' => t('type'), 'field' => 'type'),
array('data' => t('label'), 'field' => 'label'),
);
$lines_per_page = 20;
db_set_active('vpa');
$sql= "select * from is_trigger";
$sql .= tablesort_sql($header);
$result = pager_query($sql, $lines_per_page);
db_set_active();
while ($obj = db_fetch_object($result)) {
$rows[] = array(
htmlspecialchars($obj->id),
htmlspecialchars($obj->type),
htmlspecialchars($obj->label),
);
}
print theme('table', $header, $rows);
print theme('pager','',$lines_per_page);
?>
Comments
Comment #1
curtgadget commentedI can confirm this bug as well.
I wasted about 3 hours myself tonight trying to figure this one out.
Im surprised it hasnt stumped more people.
Comment #2
KrisBuytaert commentedSuggested fix is documented in http://drupal.org/node/92381
Comment #3
dvessel commentedNot a theme issue.
Comment #4
dpearcefl commentedConsidering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.