Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

mysql_query and Resource ID Errors

edited March 2008 in Vanilla 1.0 Help
I'm writing my first extension for the Vanilla community that I have inherited. I have created an additional database table that is indexed against the UserID. I am having problems with a mysql_query call to that table. After identifying the current system UserID (using $this->Context->Session->UserID) I run a simple mysql_query with returns the error RESOURCE ID #64 (or #63 or #65) depending on where the call was made. Any help?

Comments

  • Options
    It shouldn't return an error that contains 'RESOURCE ID ...'. I thought that only happened if you tried to print out the result of an SQL query. If you want to get the error you need to print the return value of mysql_error, not the return value of mysql_query. Also, if you use $Context -> Database -> Execute() instead of a straight mysql_query then it will break on an error and print the value of mysql_error.
This discussion has been closed.