WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Upgraded to 2.1 and Getting SQL Error (3 posts)

  1. lauralohr
    Member
    Posted 7 years ago #

    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'-->

  2. paulzag
    Member
    Posted 7 years ago #

    I noticed on the codex that Dropdown_get links plugin in not 2.1 compatible. Seeing this hasn't been answered I thought I'd pass it on.

    http://codex.wordpress.org/Plugins/Plugin_Compatibility/2.1

  3. obscure
    Member
    Posted 7 years ago #

    I think the problem is get_links_list. I had a very similar problem with the same error (see http://wordpress.org/support/topic/106725) and solved it by changing get_links_list to wp_list_bookmarks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.