Has anyone had the problem that the $db
variable is unusable in the addons? I've been writing my own addon, and using the $db
variable results in an error message each time a mysql_query
command is used. Adding a line that says global $db;
doesn't work either. When I print the $db
variable it returns "Resource ID #1", so I guess the variable does exist and is in fact a MySQL connection identifier. Only by adding the mysql_connect
and mysql_select_db
functions to my addon script, I can access my database.
The $SELF
variable is perfectly usable, by the way.
Please respond if you've experienced the same or have the solution!