Support » Fixing WordPress » Data Base Error

  • 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)
  • 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 and on wp_options, change the for the option_name db_version set the option_value to 3441 then do upgrade.php.

    “change the for the option_name db_version set the option_value to 3441”

    This sentence does not make sense to me

    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.

    Oops.

    Try to redo the upgrade. If necessary, use 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.

    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

    MySQL said:

    #1054 – Unknown column ‘db_version’ in ‘where clause’

    Yes, I have a backup – what a pain

    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?

    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.