Title: syntax error when using next/previous code
Last modified: August 18, 2016

---

# syntax error when using next/previous code

 *  [mollysummer](https://wordpress.org/support/users/mollysummer/)
 * (@mollysummer)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-when-using-nextprevious-code/)
 * I get the following 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 ” at line 1] SELECT COUNT(DISTINCT ID) FROM
 * when I insert the following code:
    <?php posts_nav_link(‘∞’,’« « Go Back In Time’,’
   Go Forward in Time » »’); ?>
 * I can’t figure out what’s happening. This code is working on several other websites
   I maintain.

Viewing 1 replies (of 1 total)

 *  Thread Starter [mollysummer](https://wordpress.org/support/users/mollysummer/)
 * (@mollysummer)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-when-using-nextprevious-code/#post-377861)
 * I’ve tried switching themes, going with completely different templates, etc and
   still I’m not able to figure this out. I’m using this code on the same server
   in the same theme as [http://www.thecowgoddess.com/wordpress](http://www.thecowgoddess.com/wordpress)
 * I don’t understand why it would work on that site and not on my own ( [http://www.sickerthanothers.com](http://www.sickerthanothers.com))

Viewing 1 replies (of 1 total)

The topic ‘syntax error when using next/previous code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [mollysummer](https://wordpress.org/support/users/mollysummer/)
 * Last activity: [19 years, 11 months ago](https://wordpress.org/support/topic/syntax-error-when-using-nextprevious-code/#post-377861)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
