WordPress.org

Ready to get started?Download WordPress

Forums

dbview
[resolved] Table Doesn't Exist (11 posts)

  1. Ruben
    Member
    Posted 2 years ago #

    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:

    'myuser_mydb.wp_mynameoptions'

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

    Thanks for your help!

    http://wordpress.org/extend/plugins/dbview/

  2. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. Ruben
    Member
    Posted 2 years ago #

    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

  4. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

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

  5. Ruben
    Member
    Posted 2 years ago #

    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%\"

  6. Ruben
    Member
    Posted 2 years ago #

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

  7. Ruben
    Member
    Posted 2 years ago #

    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.

  8. Ruben
    Member
    Posted 2 years ago #

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

  9. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  10. john ackers
    Member
    Plugin Author

    Posted 2 years ago #

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

  11. Ruben
    Member
    Posted 2 years ago #

    THAT WORKED!!!

    Thank you John. Will be contributing soon!

    Regards,
    Ruben

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags