• Resolved cnymike

    (@cnymike)


    I’ve got a database error showing up in my blog after I upgraded from 2.0.2 to 2.1. I’m not sure what is causing it. It appears below my Google AdSense and META on the right column of my blog. The error that appears is this…

    <div id='error'>
    <p class='wpdberror'><strong>WordPress database error:</strong> [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]<br />
    <code>SELECT cat_id, cat_name FROM </code></p>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cnymike

    (@cnymike)

    I just looked at the sidebar code and this appears to be causing the database error… does anyone have a suggestion as to what has to be changed to make the code complient?

    Thanks in advance for your help. I’m no MySql whiz.

    <?php
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    foreach ($link_cats as $link_cat) {
    ?>
    <li id="linkcat-<?php echo $link_cat->cat_id; ?>"><h4><?php echo $link_cat->cat_name; ?></h4>
    <ul>
    <?php wp_get_links($link_cat->cat_id); ?>
    </ul>
    </li>
    <?php } ?>

    Looks like your theme is not updated for 2.1. Check with the author for an update or do it yourself with the updated tags.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress database error after upgrading 2.0.2->2.1’ is closed to new replies.