Quote:
Originally Posted by Muppettt
I still seem to be plagued with this:
Fatal error: Call to a member function on a non-object in /home/pause/public_html/dev/modules/login_inc.php on line 169
error. The offending line is:
PHP Code:
// finds number of new posts $newposts = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post AS post " . iif($vbulletin->options['threadmarking'], 'LEFT JOIN ' . TABLE_PREFIX . 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' . $vbulletin->userinfo['userid'] . ')') . " WHERE dateline >= " . $vbulletin->userinfo['lastvisit'] . iif($vbulletin->options['threadmarking'], ' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)'));
$newposts = vb_number_format($newposts['count']);
echo"<a href=\"".$forumpath."search.php?$session[sessionurl]do=getnew\">$vbphrase[new_posts]</a>: $newposts<br />";
}
So i went and did a SQL query:
I have total posts commented out due to a similar problem - but don't need that feature anyway. However, the rest of the files works fine - avatar, pm's etc.
I am pretty sure i have all the correct includes and files/paths. So i can only assume there is either a problem in the query, or people are using different versions of SQL and in one of these MySQL updates, some function has been changed.
I am currently on MySQL version 4.1.21-standard.
Any ideas?
|
If you actually used that query in phpmyadmin or a similar client then it wouldn't have worked as you're trying to use php in it. i.e. variables like $vbulletin etc wouldn't work in phpmyadmin nor would ' . TABLE_PREFIX . ' you'd need to replace that block of code with whatever your forum's prefix is in the database i.e. f_users would have a prefix of f_ so for this example: AS count FROM " . TABLE_PREFIX . "post would become AS count FROM f_post
Hope that helps in at least finding out what your issue is.