I created a custom mysql table using a separate prefix from my vbulletin table prefix and I wrote a plugin to read from it in vB, but when I do:
It returns error:
Even though when I am in mysql CLI as the vb database user and:
The sql call fails via the "Execute a SQL Query" via admincp as well. How do I get my plugin to read my custom table? Do I have to do an end run around and create a 2nd new database connection outside of using the vB objects?
PHP Code:
$result = $vbulletin->db->query_first_slave("
SELECT some_field
FROM my_custom_table
WHERE some_field = 'some value'");
Code:
Invalid SQL: SELECT some_field FROM my_custom_table WHERE some_field = 'some value'; MySQL Error : Table 'vb.my_custom_table' doesn't exist
Code:
mysql> select * from my_custom_table; +------------+ | some_field | +------------+ | foo | +------------+ 1 row in set (0.00 sec)
Comment