Title: Data Base Error
Last modified: August 18, 2016

---

# Data Base Error

 *  [webmissile](https://wordpress.org/support/users/webmissile/)
 * (@webmissile)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/)
 * Under ‘Write’ in Categories, I have the following DB error:
 * WordPress database error: [Unknown column ‘link_count’ in ‘where clause’]
    SELECT
   cat_ID FROM wp_categories WHERE category_parent = 0 AND ( link_count = 0 OR category_count!
   = 0 OR ( link_count = 0 AND category_count = 0 ) ) ORDER BY category_count DESC
 * After upgrading from 2.0.2 to latest (2.2)
 * Thanks in advance
    Dave

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584639)
 * Seems like your database might not have gotten updated as those two columns got
   added to wp_categories in 2.1.
 * Try to redo the upgrade. If necessary, use [phpMyAdmin](http://codex.wordpress.org/phpMyAdmin)
   and on wp_options, change the for the option_name `db_version` set the option_value
   to 3441 then do upgrade.php.
 *  Thread Starter [webmissile](https://wordpress.org/support/users/webmissile/)
 * (@webmissile)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584641)
 * “change the for the option_name db_version set the option_value to 3441”
 * This sentence does not make sense to me
 *  Thread Starter [webmissile](https://wordpress.org/support/users/webmissile/)
 * (@webmissile)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584644)
 * If I go to wp_options, then browse option_name, I cannot find db_version.
 * I assume you are asking me to do this because the upgrade tell me that my database
   is up to date – and of course no actions are taken in the upgrade.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584645)
 * Oops.
 * Try to redo the upgrade. If necessary, use [phpMyAdmin](http://codex.wordpress.org/phpMyAdmin)
   and in the wp_options table, for the option_name `db_version`, set the option_value
   to `3441`, then do upgrade.php.
 * Yes, setting the db_version to the value 3441 will cause the upgrade.php to redo
   the database upgrade.
 * And of course, you had backups before you started this.
 *  Thread Starter [webmissile](https://wordpress.org/support/users/webmissile/)
 * (@webmissile)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584646)
 * The problem is, I am unable to locate the db_version field.
 * I click (to the left)wp_options, then I select option_name and browse, there 
   is no db_version field.
 * Of course I tried to upgrade.php but it thinks everything is fine … so I understand
   I need to change the db_version but I cannot find it.
 * Dave
 *  Thread Starter [webmissile](https://wordpress.org/support/users/webmissile/)
 * (@webmissile)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584648)
 * MySQL said:
 * #1054 – Unknown column ‘db_version’ in ‘where clause’
 * Yes, I have a backup – what a pain
 *  Thread Starter [webmissile](https://wordpress.org/support/users/webmissile/)
 * (@webmissile)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584651)
 * I have a couple of ides but don’t know if you will response soon or not.
 * I could just restore my database and try upgrade.php; is this a good idea?
 *  Thread Starter [webmissile](https://wordpress.org/support/users/webmissile/)
 * (@webmissile)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584652)
 * But I am wondering if there is an issue with the missing ‘db_name’ or if there
   is some miscommunication about it’s location.

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

The topic ‘Data Base Error’ is closed to new replies.

## Tags

 * [Data Base Error](https://wordpress.org/support/topic-tag/data-base-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [webmissile](https://wordpress.org/support/users/webmissile/)
 * Last activity: [18 years, 9 months ago](https://wordpress.org/support/topic/data-base-error-1/#post-584652)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
