Support » Fixing WordPress » the right syntax to use near ” at line 1?

  • Hi,

    I recently starting getting the following error on my site and in my post management area.

    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 ” at line 1]
    SELECT category_nicename FROM wp_categories WHERE cat_ID=

    I am seeing no other errors so far.
    I diabled all the plugins. Still there.
    I changed my permalink status:
    /index.php/category/ [I tried w/o trailing slash]

    Still there.

    I got into this pickle after deleting a category.

    If the suggestion is to reinstall, can I still keep my data? Sorry for such newbie questions….

Viewing 3 replies - 1 through 3 (of 3 total)
  • My site, if anyone wants to see what it looks like, is

    Mark (podz)


    Support Maven

    Firstly change your permalinks back so that your site works – I’m getting 404 when looking at category pages.

    Which category did you delete ?

    In your main template, can you print here just waht you have inside the meta div ? I suspect it’s perfectly normal but it won’t harm to check.

    A reinstall won’t fix this as the error is actually in the db so we need to figure it out.


    Thanks for pointing out the broken links. The category I deleted was one of the genres I listed; I recreated it once it began showing the error.

    Here’s the meta div:

    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category(‘,’) ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__(‘Edit This’)); ?>

    Thanks for any help you can offer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘the right syntax to use near ” at line 1?’ is closed to new replies.