Support » Plugin: [GWA] db Editor » What the Heck? Errors in my SQL Syntax?

  • WordPress database error: [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 ‘\”revision\”‘ at line 1]

    DELETE FROM wp_posts WHERE post_type = “revision”;

    SELECT * FROM wp_posts WHERE post_type = “attachment”;

    what the heck are the different query “types” and how come none of them do anything? I can’t figure out what is from w/ my syntax. i got the first one straight from the forums:

    http://wordpress.org/support/topic/is-this-code-safe-to-delete-post-revisions

Viewing 5 replies - 1 through 5 (of 5 total)
  • Christine Rondeau

    (@crondeau)

    Volunteer Forum Moderator

    Where are you trying to do this? The sql statement –
    DELETE FROM wp_posts WHERE post_type = “revision”;
    is for deleting posts via your phpMyAdmin.

    Is that what you are trying to do?

    that is exactly what i was trying to do, but i keep getting a syntax error. was just trying to a handle on using this plugin. thought i was using proper MYSQL syntax so i don’t know why it is failing.

    Christine Rondeau

    (@crondeau)

    Volunteer Forum Moderator

    The only thing I can think of is that your the quotes may have turned into curly quotes. Sometimes editors do that for some annoying reason. Otherwise I’ve ran this query into my phpMyadmin on many occasions.

    I’m not sure what plugin you are talking about. There’s really no plugin necessary for doing this. You should be able to access the phpMyadmin via your hosting provider control panel.

    Christine Rondeau

    (@crondeau)

    Volunteer Forum Moderator

    Ah, got it, [GWA] db Editor
    I didn’t know about this.

    You could try adminer instead – http://www.adminer.org/
    There might be something wrong with the other one.

    Personally, I would just do this via my hosting provider.

    i tried it w/ all the different quotes i could make, single, double, escaped. so i guess it is a plugin issue. normally i would do it through control panel but i didn’t have access to this particular DB.

    thanks for the tip on adminer. i’ll have to check it out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘What the Heck? Errors in my SQL Syntax?’ is closed to new replies.