the right syntax to use near '' at line 1? (4 posts)

  1. streetknowledge
    Posted 10 years ago #


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

  2. streetknowledge
    Posted 10 years ago #

    My site, if anyone wants to see what it looks like, is streetknowledge.net

  3. Mark (podz)
    Support Maven
    Posted 10 years ago #

    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.

  4. streetknowledge
    Posted 10 years ago #


    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.

Topic Closed

This topic has been closed to new replies.

About this Topic