WordPress database error
-
I’m getting the following messege in my error log. The site appears to be working fine. Any ideas?
Below it the SQL for the wp_comments
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 7 for query
SELECT
COUNT(comment_ID)
FROM
wp_comments
WHERE
comment_type = “” AND comment_approved=”1″ AND comment_parent=”0″ AND
comment_post_ID= made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/graphene/404.php’), get_header, locate_template, load_template, require_once(‘/themes/graphene/header.php’), wp_head, do_action(‘wp_head’), call_user_func_array, wp_enqueue_scripts, do_action(‘wp_enqueue_scripts’), call_user_func_array, graphene_localize_scripts, graphene_get_comment_count
-- phpMyAdmin SQL Dump
-- version 3.5.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 30, 2013 at 07:36 PM
-- Server version: 5.1.69-cll
-- PHP Version: 5.3.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- DELETED--
--
--
-- Table structure for table <code>wp_comments</code>
--
CREATE TABLE IF NOT EXISTS <code>wp_comments</code> (
<code>comment_ID</code> bigint(20) unsigned NOT NULL AUTO_INCREMENT,
<code>comment_post_ID</code> bigint(20) unsigned NOT NULL DEFAULT '0',
<code>comment_author</code> tinytext NOT NULL,
<code>comment_author_email</code> varchar(100) NOT NULL DEFAULT '',
<code>comment_author_url</code> varchar(200) NOT NULL DEFAULT '',
<code>comment_author_IP</code> varchar(100) NOT NULL DEFAULT '',
<code>comment_date</code> datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
<code>comment_date_gmt</code> datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
<code>comment_content</code> text NOT NULL,
<code>comment_karma</code> int(11) NOT NULL DEFAULT '0',
<code>comment_approved</code> varchar(20) NOT NULL DEFAULT '1',
<code>comment_agent</code> varchar(255) NOT NULL DEFAULT '',
<code>comment_type</code> varchar(20) NOT NULL DEFAULT '',
<code>comment_parent</code> bigint(20) unsigned NOT NULL DEFAULT '0',
<code>user_id</code> bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (<code>comment_ID</code>),
KEY <code>comment_post_ID</code> (<code>comment_post_ID</code>),
KEY <code>comment_approved_date_gmt</code> (<code>comment_approved</code>,<code>comment_date_gmt</code>),
KEY <code>comment_date_gmt</code> (<code>comment_date_gmt</code>),
KEY <code>comment_parent</code> (<code>comment_parent</code>)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Dumping data for table <code>wp_comments</code>
--
INSERT INTO <code>wp_comments</code> (<code>comment_ID</code>, <code>comment_post_ID</code>, <code>comment_author</code>, <code>comment_author_email</code>, <code>comment_author_url</code>, <code>comment_author_IP</code>, <code>comment_date</code>, <code>comment_date_gmt</code>, <code>comment_content</code>, <code>comment_karma</code>, <code>comment_approved</code>, <code>comment_agent</code>, <code>comment_type</code>, <code>comment_parent</code>, <code>user_id</code>) VALUES
(1, 1, 'Mr WordPress', '', 'http://wordpress.org/', '', '2013-06-28 00:23:10', '2013-06-28 00:23:10', 'Hi, this is a comment.nTo delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.', 0, 'post-trashed', '', '', 0, 0);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Thanks
Dan
Admin
Do a search on this forum first before posting another topic like this. There’s already an existing topic about this issue:
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
