WordPress.org

Forums

Can't create table during activation... (3 posts)

  1. theBrettman
    Member
    Posted 1 year ago #

    I want to create a table during activation of my plugin but it doesn't create anything and I get this error: The plugin generated 788 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    here is the pastebin: http://pastebin.com/TdfaXncK

  2. theBrettman
    Member
    Posted 1 year ago #

    I thought it was the trailing comma on the last line but even removing that didn't fix it. I ended up replacing $wpdb->prepare() with a regular sql string and it worked. Even $wpdb->query() didn't work. I took the example straight from the codex verbatim too and that didn't work either! Someone should update the codex with a working example maybe?

  3. Richard Royal
    Member
    Posted 1 year ago #

    This bug is a pain. I have the same situation with a $wpdb->query($sql) upon plugin activation.

Topic Closed

This topic has been closed to new replies.

About this Topic