WordPress.org

Forums

[GWA] db Editor
db Editor] What the Heck? Errors in my SQL Syntax? (6 posts)

  1. helgatheviking
    Member
    Posted 3 years ago #

    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

  2. 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?

  3. helgatheviking
    Member
    Posted 3 years ago #

    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.

  4. 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.

  5. 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.

  6. helgatheviking
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • [GWA] db Editor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic