pavalache Posted August 6, 2009 Posted August 6, 2009 Guys, another error i can't fix. When trying to move a topic to another thread i get this(mccodes v2): Fatal error: Call to a member function query() on a non-object in /home/gamedb/public_html/forums.php on line 646 Line 646: $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$_POST['forum']}"); $forum=$db->fetch_row($q2); $db->query("UPDATE forum_topics SET ft_forum_id={$_POST['forum']} WHERE ft_id={$_GET['topic']}"); $db->query("UPDATE forum_posts SET fp_forum_id={$_POST['forum']} WHERE fp_topic_id={$_GET['topic']}"); print "Topic moved... "; Quote
PHP Scene Posted August 6, 2009 Posted August 6, 2009 Re: forum error If your using v1, change $db-> to mysql_ if your using v2, add: global $db; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.