![]() |
How to query custom table
I created a custom mysql table using a separate prefix and I wrote a plugin to read from it in vB, but when I do:
PHP Code:
Code:
Invalid SQL: Even though when I am in mysql CLI as the vb database user and: Code:
mysql> select * from my_custom_table; |
Quote:
Can you try this? PHP Code:
Code:
. TABLE_PREFIX . |
This does/will not work because I am pretty sure TABLE_PREFIX points to the $config['Database']['tableprefix'] value.
It looks like vbulletin is unable to query any tables except its own. Unless there is some sort of tablenamespace cache I have to flush. (I'm not using any caching just the normal mysqli to a single mysql server setup). |
Quote:
The error you got is, as I mentioned above, that your custom table is using a prefix and when the query is run, it doesn''t find it. Or enter the full table name with the prefix included in the query. |
Quote:
But even if I created vbmy_custom_table, and called .TABLE_PREFIX. it does not find the table... |
All times are GMT. The time now is 03:33 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|