Support » Plugin: dbview » [Plugin: dbview] Table Doesn't Exist

  • Resolved Ruben


    When I click on the ‘List Views’ button in the admin panel, I get the following error:

    Table ‘myuser_mydb.wp_options’ doesn’t exist

    Just looking at this error code, I can tell that the options table being referenced is incorrect, due to the different naming convention used during my install. The correct reference to this table should be:


    When I save a view, I did confirm that it is saving it to the above correct table.

    Thanks for your help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author john ackers


    Rugar8, if i have understood the problem correctly, it might be fixed by deactivating and reactivating the plugin.

    If that doesn’t work ‘load’ the ‘List views’ view and replace wp_options with wp_mynameoptions, click ‘save’, then click ‘execute’ and you should see all views.

    Then if you click on ‘List views’ you should no longer get an error and again see all views.

    If that still doesn’t work, can you ‘load’ the ‘List views’ view again and post the SQL in a reply here. Best of luck.

    Hello John,

    Thanks for the quick follow up. I have tried both of your suggestions and still experiencing the same errors. Here are the details:

    I deactivated plugin and reactivated. Same issue as in my original post.

    I loaded ‘List views’, made the table reference correction, saved it, then executed query. Here’s the error result I got:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\”dbview%\”‘ at line 1

    Plugin Author john ackers


    can you ‘load’ the ‘List views’ view again and post the SQL in a reply here. Thanks.

    No problem. Thanks!

    Here’s the ‘List views’ load, with ONLY the table reference updated to reflect my actual options table name:

    select option_name as name, option_value as v1, option_value as v2, option_value as v3 from wp_shoplocaloptions where option_name like \”dbview%\”

    Not sure if it helps, but I’m using MySQL Server Version 5.0.95

    Follow up: I’ve been able to pull data back with simple queries. It seems that only queries that include WHERE, LIKE or similar clauses seem to error out.

    FYI: I have get_magic_quotes_gpc function disabled on my PHP installation. I noticed you call this function in your code.

    Plugin Author john ackers


    Ruben, I recreated the same problem by disabling magic quotes as you have done. However it looks like wp adds slashes by default to all input fields, which i hadn’t realised.

    I have committed a minor change in release 0.4.3 to fix this problem. Let me know if that works for you. Thanks for reporting it.

    Plugin Author john ackers


    By the way you will have to load ‘List views’ again, remove the back slashes and save it again!


    Thank you John. Will be contributing soon!


Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: dbview] Table Doesn't Exist’ is closed to new replies.