• 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 comment_approved = ‘1” at line 1]
    SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = AND comment_approved = ‘1’;

    It says this on the index page of my blog where the content (of blog entry) is supposed to appear. I was wondering which part went wrong. I’d really appreciate it if anyone could help me out with this.
    Also, I would like to know where can I find the default templates.
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • If the blog you mean is the one linked from your name, then everything now looks sweet.
    Default templates ? Not sure what you mean ?

    What causes this kind of error message anyway? I get the following message as an admin when I try to view a post with a future timestamp. Note that after the SQL errors, it finally gives the correct plain-language error message.
    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 3]
    SELECT category_id, cat_name, category_nicename, category_description, category_parent FROM wp_categories, wp_post2cat WHERE wp_post2cat.category_id = cat_ID AND wp_post2cat.post_id =
    Warning: Invalid argument supplied for foreach() in /home/homecome/public_html/weblog/wp-includes/template-functions-category.php on line 65
    Sorry, no posts matched your criteria.
    Like a 404 message, I also get it when I type in a bad URL:
    http://homecomers.org/weblog/index.php/archives/2004/9 instead of http://homecomers.org/weblog/index.php/archives/2004/10 (my blog started in October so there are no September entries).

    Well, I guess something I did today fixed the problem. Now when I try to access a non-existent page, or one that is dated for the future, I get the simple “Sorry, no posts matched your criteria.”

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Database error?’ is closed to new replies.