Title: MySQL Error &#038; Template Problem
Last modified: August 18, 2016

---

# MySQL Error & Template Problem

 *  [benblei](https://wordpress.org/support/users/benblei/)
 * (@benblei)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/mysql-error-038-template-problem/)
 * I am having two problems trying to get a custom template to work on my website
   @ [http://www.bleikamp.com.](http://www.bleikamp.com.)
    1. I cannot get posts
   to show up on the main page at all. I don’t understand why, I have been working
   for 3 hours and looking through the forums. What I did was copy the div class“
   post” from the original template and inserted that into my design, then I uploaded
   that as the index.php. I have been trying everything I can think of and nothing
   seems to work. 2. I get this error on the main page: 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’; Any help wuold be great.

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

 *  Anonymous
 * [21 years, 6 months ago](https://wordpress.org/support/topic/mysql-error-038-template-problem/#post-104065)
 * Did you copy the lines from the top of the original template into your design?
   The lines that say “do not remove this…” ?
 *  Thread Starter [benblei](https://wordpress.org/support/users/benblei/)
 * (@benblei)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/mysql-error-038-template-problem/#post-104066)
 * I copied any include that looked like it referred to posts.

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

The topic ‘MySQL Error & Template Problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [benblei](https://wordpress.org/support/users/benblei/)
 * Last activity: [21 years, 6 months ago](https://wordpress.org/support/topic/mysql-error-038-template-problem/#post-104066)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
