Title: Permalink and database error
Last modified: August 18, 2016

---

# Permalink and database error

 *  [stopthepress](https://wordpress.org/support/users/stopthepress/)
 * (@stopthepress)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/permalink-and-database-error/)
 * WP 1.5.1
    I have edited my Permalink structure as:
 * /archive/%year%/%monthnum%/%day%/%postname%/
 * The links seems to be working fine but I get the following error at every page:
 * 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=
 * Any idea?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/permalink-and-database-error/#post-222538)
 * What theme are you using?
    Do you run any category-related plugins? Does this
   happen on single-post pages, or other types?
 *  Thread Starter [stopthepress](https://wordpress.org/support/users/stopthepress/)
 * (@stopthepress)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/permalink-and-database-error/#post-222552)
 * Server: Linux/Apache
    To make it simple I used: /index.php/archive/%year%/%postname%//
   index.php/category without .htaccess
 * have tested using my own theme and wordpress default. The error appear on all
   post and categories.
 * Plugins:
    Include page 1.0 Last Post Since 1.0 Static Front Page 1.0.2
 *  Thread Starter [stopthepress](https://wordpress.org/support/users/stopthepress/)
 * (@stopthepress)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/permalink-and-database-error/#post-222634)
 * Solved!
 * See the solution here:
    [http://blog.taragana.com/index.php/archive/wordpress-tip-on-permalink-options/](http://blog.taragana.com/index.php/archive/wordpress-tip-on-permalink-options/)
 *  [angsuman](https://wordpress.org/support/users/angsuman/)
 * (@angsuman)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/permalink-and-database-error/#post-222635)
 * Specifically check the comments section in the link above starting [here](http://blog.taragana.com/index.php/archive/wordpress-tip-on-permalink-options/#comment-5266).
 *  [debwire](https://wordpress.org/support/users/debwire/)
 * (@debwire)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/permalink-and-database-error/#post-222783)
 * I have a similar problem and the solution identified in the link doesn’t work
   for me because I don’t have any reference to
 * the_category()
 * in my theme.
 * I’ve set up my permalinks structure as follows:
 * /index.php/%year%/%monthnum%/%day%/%postname%/
 * which I suppose is fine, but:
 * 1. I can only use my categories pull-down menu on my main page in order to correctly
   go to a category (example: [http://magazine.interracialweb.com/index.php](http://magazine.interracialweb.com/index.php))
   and
 * 2. Get a 404 not found error when I try to use the pull down menu for my blog
   categories everywhere else (example: [http://magazine.interracialweb.com/index.php/2005/12/05/beautiful-multicultural-babies-cookies/](http://magazine.interracialweb.com/index.php/2005/12/05/beautiful-multicultural-babies-cookies/)).
 * The pull down menu code I’m using is directly from the codex:
 * <form action=”<?php echo $PHP_SELF ?>” method=”get”>
    <p style=”padding: 0px;
   margin: 0px;”><?php dropdown_cats(); ?> <input type=”submit” name=”submit” value
   =”Go” /> </form>
 * What do I need to do to fix this?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Permalink and database error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [debwire](https://wordpress.org/support/users/debwire/)
 * Last activity: [20 years, 5 months ago](https://wordpress.org/support/topic/permalink-and-database-error/#post-222783)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
