Title: WordPress database error in your SQL
Last modified: August 18, 2016

---

# WordPress database error in your SQL

 *  [mafunk](https://wordpress.org/support/users/mafunk/)
 * (@mafunk)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-your-sql/)
 * Can anyone tell me how to fix this. I know that there is nothing wrong with MySQL
   server, so it must be somthing else.
 * Error message
    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
 * Code that I think is generating it:
    <?php
 *  $link_cats = $wpdb->get_results(“SELECT cat_id, cat_name FROM $wpdb->linkcategories”);
 *  foreach ($link_cats as $link_cat) {
 *  ?>
 * Any ideo on how to fix?

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

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-your-sql/#post-517616)
 * Look to see if your theme author has an update for 2.1 or change the tags yourself.
   
   [http://codex.wordpress.org/Template_Tags](http://codex.wordpress.org/Template_Tags)
   The new tags have 2.1 beside them and the old ones have ‘deprecated’ beside them.
 *  [steve1959](https://wordpress.org/support/users/steve1959/)
 * (@steve1959)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-your-sql/#post-517864)
 * I have the same error but I have no clue how I should change the tags or where
   to change the tags.
 * I bought my Theme and the company is telling me I have to find a host using the
   old wordpress (before update 2.1)
 * Does anyone have a relativey easy fix for those of us who are not into writting
   code?
 *  Thread Starter [mafunk](https://wordpress.org/support/users/mafunk/)
 * (@mafunk)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-your-sql/#post-517954)
 * Thank you. I wasn’t able to figure out how to update the tag, but your advice
   did help me figure a go around.

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

The topic ‘WordPress database error in your SQL’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [mafunk](https://wordpress.org/support/users/mafunk/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-your-sql/#post-517954)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
