Title: Error!
Last modified: August 18, 2016

---

# Error!

 *  [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * (@p0werrr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/)
 * Hi,
 * I installed the latest wordpress and I am using the theme, freshy.
 * On the sidebar I am getting this error:
 * `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]`
 * …Under the “Links” coloum.
 * PLEASE help! 😀
 * [http://game-warp.com](http://game-warp.com) <– the blog

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633921)
 * That’s a theme incompatibility.
    You have a code (shown in your other post) that
   refers to categories (cat_ID). There is no categories table in WP 2.3.
 *  Thread Starter [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * (@p0werrr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633925)
 * Hi and thanks for the reply!
 * Do you have any idera how I can fix this?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633928)
 * [http://codex.wordpress.org/Template_Tags#Links_Manager_tags](http://codex.wordpress.org/Template_Tags#Links_Manager_tags)
   
   Check which are the working and the deprecated template tags. Check your sidebar.
   php to see what code is there. If there is an old code – replace it.
 *  Thread Starter [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * (@p0werrr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633930)
 * Here is my sidebar.php:
 *     ```
       <?php global $freshy_options; ?>
   
       	<div id="sidebar">
       		<div>
       		<?php if ( !function_exists('dynamic_sidebar')
               || !dynamic_sidebar() ) : ?>
       		<?php if(function_exists('yy_menu')) : ?>
       			<h2><?php _e('Navigation',TEMPLATE_DOMAIN); ?></h2>
       			<ul>
       			<?php yy_menu('sort_column=menu_order&title_li=',
       								'hide_empty=0&sort_column=name&optioncount=1&title_li=&hierarchical=1&feed=RSS&feed_image='.get_bloginfo('stylesheet_directory').'/images/icons/feed-icon-10x10.gif'); ?>
       			</ul>
   
       		<?php elseif (function_exists('freshy_menu')) :
       			freshy_menu($freshy_options['args_pages'],$freshy_options['args_cats']);
       		endif; ?>
   
       			<h2><?php _e('Search',TEMPLATE_DOMAIN); ?></h2>
       			<?php include (TEMPLATEPATH . '/searchform.php'); ?>
   
       			<h2><?php _e('Links',TEMPLATE_DOMAIN); ?></h2>
       			<ul>
       			 <?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; ?>"><?php echo $link_cat->cat_name; ?>
       			   <ul>
       			    <?php wp_get_links($link_cat->cat_id); ?>
       			   </ul>
       			  </li>
       			 <?php } ?>
       			</ul>
       		<?php endif; ?>
       		</div>
       	</div>
       ```
   
 * Is there any chance you can change the tags/help me? I’m pretty new to this 🙁
 * Thanks 😀
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633937)
 * I’d replace this:
 *     ```
       <h2><?php _e('Links',TEMPLATE_DOMAIN); ?></h2>
       			<ul>
       			 <?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; ?>"><?php echo $link_cat->cat_name; ?>
       			   <ul>
       			    <?php wp_get_links($link_cat->cat_id); ?>
       			   </ul>
       			  </li>
       			 <?php } ?>
       			</ul>
       ```
   
 * with whatever is suggested in the Codex for your version.
 *  Thread Starter [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * (@p0werrr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633938)
 * How do I know what is suggested in the codex for my version?
 * I am running the latest wordpress, I just installed it yesterday @ [http://game-warp.com](http://game-warp.com)
 * Thanks.
 *  Thread Starter [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * (@p0werrr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633943)
 * You said:
 * There is no categories table in WP 2.3.
 * So there’s no way I can get it to work? 🙁
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633951)
 * Not with that code I posted above. Delete it from your sidebar.
    Then go and 
   pick one of the Link template tags from the Codex, that is NOT deprecated and
   put it in your sidebar file. Use them in their simplest form to start.
 *  Thread Starter [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * (@p0werrr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633956)
 * So I can use this:
 * [http://codex.wordpress.org/Template_Tags/get_links_list](http://codex.wordpress.org/Template_Tags/get_links_list)
 * ?
 * I’m sligtly confused, sorry 🙁
 * IF it’s quick is there any chance you can do it for me please? 😀
 * If so just code tag the whole of the sidebar.php
 * Thanks 😀
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633961)
 * Try it. Only you can test if it works.
    Delete what I said and replace it with`
   <?php get_links_list('id'); ?>` See if it works. If not, try another tag – bookmark_list
   is the latest…
 *  Thread Starter [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * (@p0werrr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633966)
 * YES!
 * Thank you ever so much!
 * It works!
 * Whoooooooooooooo
 * **THANKS AGAIN!**

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Error!’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 11 replies
 * 2 participants
 * Last reply from: [p0werrr](https://wordpress.org/support/users/p0werrr/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/error-8/#post-633966)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
