• AH!

    I updated to the latest version of wordpress (AFTER I CHECKED WHAT’S NEEDED AND WHAT PLUGINS DON’T WORK). And after doing so I get this for my blogroll (there are 5 blogs for 5 errors):

    WordPress database error: [Table ‘mysql_namedemo.wp_link2cat’ doesn’t exist]
    SELECT category_id FROM wp_link2cat WHERE link_id = 11 ORDER BY category_id

    WordPress database error: [Table ‘mysql_namedemo.wp_link2cat’ doesn’t exist]
    SELECT category_id FROM wp_link2cat WHERE link_id = 9 ORDER BY category_id

    And this shows up in the category box when I make a post. However the categories show up fine on the site:

    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

Viewing 15 replies - 16 through 30 (of 35 total)
  • I have a similar error with my database, and have gone through many of the same steps.

    Any thought on how to resolve. This is an important issue – I have a very busy site (2,500+ posts and 15,000 – 25,000 visitors per week).

    I need to resolve ASAP.

    Thanks

    I experienced the very same issue upgrading 2.0.5 to 2.1-Ella last night. I’ve since reverted back to the 2.0.5 version, however after running the upgrade – the necessary database updates were not made.

    The server is running the necessary PHP (4.4.1) and MYSQL (4.0.27-standard) versions.

    I deleted the necessary files first:
    /wp-admin
    /wp-includes
    wp-*.php files;
    EXCEPT wp-config.php

    I then uploaded the new 2.1 files

    I executed the upgrade by going to /wp-admin/upgrade.php which ran for less than a second. then went to my Admin panel and the errors started.

    Going to the WRITE tab – the box on the right displaying the categories showed:

    [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

    Going to the LINKS tab – the links displayed fine, however none of the links were assigned to a category. Additionally, when going into edit a link – the category box displayed the above error, and when trying to edit the link – same thing.

    On the blog itself, the links list does not display, instead, I saw this error:

    WordPress database error: [Table 'mydb_wp.wp_link2cat' doesn't exist]
    SELECT category_id FROM wp_link2cat WHERE link_id = 109 ORDER BY category_id
    WordPress database error: [Table 'mydb_wp.wp_link2cat' doesn't exist]
    SELECT category_id FROM wp_link2cat WHERE link_id = 109 ORDER BY category_id

    I had performed a brand new installation on a subdomain, in order to compare the two databases. The brand new install has no issues and the db tables were built perfectly. When I compared the two databases, however, it was clear that the database updates were not made during the upgrade process.

    Backups are a good thing! ??

    Planning on trying this again on another site I have (one that gets little to no traffic) and see if I experience the same issue.

    foolwisdom, I deleted all the files (including mods) and uploaded them all.

    The error still persists.

    I have a backup also… so I’m not that worried. Backups are a good thing ??

    Just an update to my entry above.. as mentioned, I had downgraded back to 2.0.5 after the initial upgrade failed.

    Today, I went through my plugins and made sure all were deactivated. I also had plugins in there that I haven’t been using at all… those plugins also still had tables in my database that weren’t being used.. so I deleted those plugins and the associated db tables. The plugins specifically were:

    Short Stats
    Fire Stats
    Feed Stats

    After I did all that, I backed up, ran the upgrade and didn’t experience any of the problems I noted above. It all went just as it should, with zero issues.

    I don’t know if those plugins (and assoc. tables) were an issue in the first instance… or if I just chose a bad time to run the upgrade (i.e. 2-3 am is right when our servers perform server-wide backups)… no clue. It’s still a mystery, however I have upgraded 4 other sites since then and this issue has not been duplicated.

    It seems quite a few folks are having problems with Akismet (default plugin with install). Please be sure you deactivate it before the upgrade and that you have the latest version installed after upgrade before activating it again.

    Ummm, I also have firestats. I’ll do the downgrade right away, to see if that helps to solve the problem.

    Yup, it’s a matter of disabling all the plugins before doing the upgrade. That solved the problem in my case.

    I had to erase the tables of firestats, and also, I erased the table of bad-behavior, just in case.

    It’s working… it’s alive!!! I love this 2.1 version! I really do.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Yes, there’s a reason that the update procedures always say to disable plugins first. Really. ??

    Thread Starter netmasa

    (@netmasa)

    Doesn’t work. I disabled all plugins, and everything. And I got nothing.

    I’ve definitely deactivated all plugins before the upgrade procedure. But still get a sql error in my sidebar.

    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 cat_id, cat_name FROM

    No Plugins from above were installed…
    How can i check that the DB upgrade was done?

    PHP Version: 4.4.4
    mySQL: 5.0.27

    Thread Starter netmasa

    (@netmasa)

    I deleted plugin option stuff from the sql database that I don’t use any more, checked, repaired and optimised any table that could so apply, and upgraded and…nothing happened.

    I still have the same error.

    Yes, there’s a reason that the update procedures always say to disable plugins first. Really. ??

    Just wanted to clarify – – the plugins I mentioned above : Fire Stats, Short Stats and Feed Stats.. WERE deactivated during my first upgrade attempt. It wasn’t until after I dumped their tables in the DB that the upgrade actually took for me. ??

    I dumped plugin tables too, and no luck.

    Fixed! I did it by following the instructions on this thread

    Which of those instructions did you follow? The link from user “mariogarcia” or the solution from “colimaradical”?

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Stupid WordPress SQL’ is closed to new replies.