Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Call to undefined function: tep_db_query() in footer.php


pitergg

Recommended Posts

Hello

I've got this error in footer.php :(

Fatal error: Call to undefined function: tep_db_query() in /var/lib/httpd/virtual/www.mysite.com.pl/footer.php on line 15

and it's my 15th line in footer.php:

	$q = tep_db_query("SELECT count(*) as online FROM " . TABLE_WHOS_ONLINE);

 

What should I do?

Link to comment
Share on other sites

Hello

I've got this error in footer.php :(

Fatal error: Call to undefined function: tep_db_query() in /var/lib/httpd/virtual/www.mysite.com.pl/footer.php on line 15

and it's my 15th line in footer.php:

	$q = tep_db_query("SELECT count(*) as online FROM " . TABLE_WHOS_ONLINE);

 

What should I do?

that function is in includes/functions/database.php

  function tep_db_query($query, $link = 'db_link') {
global $$link;

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
  error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
   $result_error = mysql_error();
   error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

return $result;
 }

 

is weird you only get that error in footer though, have you altered layout and <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

is now after <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

if you get that error else where re-upload includes/functions/database.php

 

Have you added a contribution ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...