Title: Database Error
Last modified: August 19, 2016

---

# Database Error

 *  [mfoley](https://wordpress.org/support/users/mfoley/)
 * (@mfoley)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/)
 * I am able to log in to my site: maureencooke.com
    However, none of the site is
   public. When I looked at my error logs with my web host, I saw 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‘
   AND `meta_key` = ‘wp_car_tag’ LIMIT 1′ at line 1 for query SELECT `meta_value`
   FROM `wp_postmeta` WHERE `post_id` = AND `meta_key` = ‘wp_car_tag’ LIMIT 1 made
   by require, require_once, include, get_footer, locate_template, load_template,
   require_once, wp_footer, do_action,
 * I have no idea how to fix it.
    Can anyone help? Maureen

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

 *  [DigitalMcGrath](https://wordpress.org/support/users/digitalmcgrath/)
 * (@digitalmcgrath)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/#post-1597832)
 * If you are running the WP Comment Auto Responder plugin, disable it and see if
   your site comes back up.
 *  Thread Starter [mfoley](https://wordpress.org/support/users/mfoley/)
 * (@mfoley)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/#post-1597874)
 * Hi Digital,
    I’m not running that plugin. Maureen
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/#post-1597880)
 * Try decativating all plugins. If that resolves the issue, reactivate each one
   individually until you find the cause.
 * If that does not resolve the issue, try switching to the Default theme (WordPress
   2.9) or the Twenty Ten theme (WordPress 3.0) to rule-out a theme-specific issue.
 *  Thread Starter [mfoley](https://wordpress.org/support/users/mfoley/)
 * (@mfoley)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/#post-1597882)
 * Thanks, James.
    All my plugins had deactivated yesterday, so I’d been re-installing.
   But, geesh, when I went to switch my theme from Suffusion to Twenty Ten, turns
   out I had NO theme chosen and only ONE available – Twenty Ten. Links to my pictures
   are down, but at least the site is up. Do you have any idea what could have happened?
   Could I have been hacked? Right before all this happened, someone had ‘spoofed’
   my email from my other site: mfharnisch.com When I checked with my web host, 
   I was told I hadn’t been hacked just spoofed. Thanks for all your help, Maureen
 *  Thread Starter [mfoley](https://wordpress.org/support/users/mfoley/)
 * (@mfoley)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/#post-1597884)
 * A follow-up.
    All of my images have broken links. Is there a way to fix them 
   all at once? Or will I have to do it picture by picture? Maureen
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/#post-1597888)
 * > Do you have any idea what could have happened? Could I have been hacked?
 * That’s entirely possible, or your hosting account was corrupt and lost a few 
   files. You may want to check with your hosting provider before proceeding.
 * > All of my images have broken links. Is there a way to fix them all at once?
   > Or will I have to do it picture by picture?
 * Editing picture-by-picture is the safest and probably easiest way. If they were
   all broken in the same fashion (missing the same directory in the URL, missing
   the same letters from the file names, etc.) you could use a MySQL query to find
   and replace everything in one run, but it could also find and replace something
   that it shouldn’t, leading to unintentional database damage.

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

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

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/database-error-51/#post-1597888)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
