I get this error when I add a new node. I searched my entire drupal install and can find no declaration of db_select and google comes up with Drupal 7 examples. A quick search on api.drupal.org shows that there is no such function for Drupal 6.

Comments

marcustan138’s picture

I am having the same problem here. Running core 6.26. Whenever a node is added or updated, the site complains abt http 500 error. Checking the httpd-error.log file reveals this "PHP Fatal error: Call to undefined function db_select() in /kk/sites/all/modules/shadow/shadow.index.inc on line 262.

Any solution in site?

suhas448’s picture

shadow.index.inc used drupal 7 style of db query. Here i rewrite as drupal 6 style.
I hope this will work.

/*
$tids = db_select('shadow_table', 't')
->fields('t', array('tid'))
->condition('t.base_table', $base_table)
->execute()
->fetchCol();
*/

$qry = db_query("SELECT tid FROM {shadow_table} WHERE base_table='%d'",$base_table);
while($result=db_fetch_array($qry)){
$tids[]=$result['tid'] ;
}