The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Fatal error: Call to a member function query_first_slave() on a non-object
Hello All,
I got this: Fatal error: Call to a member function query_first_slave() on a non-object in /home/penguink/public_html/forums/includes/functions.php on line 1178 in this code: PHP Code:
- Pc1203 |
#2
|
||||
|
||||
Whattya doing mate? Why the mish mash of vb and non vb related calls?
You have included global.php so you have access to $vbulletin->db. Dont go making another connection. Also you are making a connection but not assigning it to a variable replace this... If ($vbulletin->userinfo['userid']!=0) { } else { echo "Please Login, <a href=\"login.php\">here</a>"; exit(); } with If (!$vbulletin->userinfo['userid']) print_no_permission(); get rid of this mysql_connect("localhost", "$database_user", "$database_pass") or die(mysql_error()); mysql_select_db("$database_db") or die(mysql_error()); replace this $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ with this $result = $vbulletin->db->query_read($query); while($row = $vbulletin->db->fetch_array($result)){ |
#3
|
|||
|
|||
Quote:
- Pc1203 |
#4
|
|||
|
|||
Bump. Any help? I'm currently using a DIFFERENT database from my forums.
- Pc1203 |
#5
|
||||
|
||||
I answered the question mate. You are making a db connection and not assigning it to a varibale.
If you want to access a different database, just prefix the table with the database name select otherdatabase.table.field... |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|