WordPress.org

Ready to get started?Download WordPress

Forums

Drop Table strange error (2 posts)

  1. grosbouff
    Member
    Posted 6 years ago #

    Hello, I use this code to drop a table :

    if ($wpdb->query(" DROP TABLE$table_name` ")) {
    $message.='

  2. table '.$table_name.' dropped successfully.
  3. ';
    } else {
    $message.='
  4. problem while dropping table '.$table_name.'.
  5. ';
    }`

    The script IS correctly dropping the table; but show the incorrect message ('problem while dropping table....'), do you know why ?

    Also, is it possible to make a request to directly disable the plugin from my plugin page ?

  • MichaelH
    Member
    Posted 6 years ago #

    Can't answer your question but maybe point you to an example.

    Take a look at how Gamerz does the uninstall for WP-PostRatings 1.20 plugin. There's a table drop and a deactivation in there.

    http://lesterchan.net/portfolio/programming.php

    Don't forget to click on his Donations link!

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags