The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Access denied when executing a SQL query from a plugin
Hi,
I get this message when I enable the following plugin : Code:
$query="SELECT username FROM user WHERE userid = 1"; $result = mysql_query($query) or die(mysql_error()); What could be the reason ? everything is working otherwise, the board, as the SQL queries from Maintenance > Execute SQL Query. |
#2
|
|||
|
|||
Your password is wrong check your config.php in your includes folder
$config['MasterServer']['password'] = |
Благодарность от: | ||
In Omnibus |
#3
|
||||
|
||||
That's also not how you execute queries within vbulletin. You need to go through the db object to make the query. Take a look at any vbulletin page and see how it's done.
|
2 благодарности(ей) от: | ||
grey_goose, MarkFL |
#4
|
||||
|
||||
Its failing because you are using completely the wrong method to access the database.
As posted above, you need to use the $db object within vbulletin, not raw calls to mysql_query(). |
2 благодарности(ей) от: | ||
grey_goose, MarkFL |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|