WordPress.org

Support

Support » Installation » [Resolved] Upgraded to 2.1 and Getting SQL Error

[Resolved] Upgraded to 2.1 and Getting SQL Error

  • I apologize if this has been addressed already, but I was unable to find a support topic that specifically addressed this issue. I have taught myself WordPress and know I do not know everything, so I would appreciate if you would be gentle with your response.

    I am using the “Dropdown_get links” plugin and recently upgraded to 2.1. I am now getting the following error on my site (www.lauralohr.com):

    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 ‘where cat_id <> 4 order by cat_id’ at line 1]
    SELECT cat_id, cat_name FROM where cat_id <> 4 order by cat_id

    ****I believe the following code is using the wrong tags and have tried to make some changes to no avail. If anyone would be kind enough to let me know the correct tags, I would appreciate it!

    <!-- Begin - Links from the 'Links Manager'-->
    <?php
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcats where cat_id <> 4 order by cat_id");
    foreach ($link_cats as $link_cat) {
    if (get_links_list($link_cat->cat_id, '', '', '', FALSE, '', FALSE, FALSE, -1, FALSE, FALSE)) {
    ?>
    <div class="left-widget-title"
    id="linkcat-<?php echo $link_categories->cat_id; ?>">
    <?php echo $link_categories->cat_name; ?>
    </div>
    <div class="left-widget">
    <ul>
    <?php wp_get_links_list($link_cat->cat_id); ?>
    </ul>
    </div>
    <?php
    }
    }
    ?>
    <!-- End - Links from the 'Links Manager'-->

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Upgraded to 2.1 and Getting SQL Error’ is closed to new replies.
Skip to toolbar