I have the latest version of Wordpress, I have it configured to call a custom footer.php file that works fine, but I'm attempting to query a number from a separate database and it's not working, here's the code:
The code works fine on other non-blog portions of the site, just not in the blog, here's the error:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/public_html/includes/footer.php on line 6
I tried to add this to the footer without success:
PHP Code:
<?php
include('/home/public_html/iedb/includes/config.php');
// Request the text of all the info
$query = 'SELECT cl_ver FROM changelog ORDER BY cl_ver DESC LIMIT 1';
$result = mysql_query($query);
$vers_cl = mysql_result($result, 0);
?>
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/public_html/includes/footer.php on line 6
I tried to add this to the footer without success:
PHP Code:
<?php
mysql_close();
?>
<?php
include('/home/public_html/iedb/includes/config.php');
// Request the text of all the info
$query = 'SELECT cl_ver FROM changelog ORDER BY cl_ver DESC LIMIT 1';
$result = mysql_query($query);
$vers_cl = mysql_result($result, 0);
?>
Comment