Title: SQL Error In Using Get Links
Last modified: August 18, 2016

---

# SQL Error In Using Get Links

 *  [dyadcore](https://wordpress.org/support/users/dyadcore/)
 * (@dyadcore)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/sql-error-in-using-get-links/)
 * I am trying to make a links page, so I insert the following PHP.
 * <?php get_links(‘2’, ‘
   ‘, ‘‘, ‘‘, FALSE, ‘id’, TRUE, FALSE, ”, FALSE, TRUE); ?
   >
 * However, the page displays the 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 link_url, link_name, link_image, link_target, link_description,
   link_rating, link_rel , IF (DATE_ADD(link_updated, INTERVAL 120 MINUTE) >= NOW(),
   1,0) as recently_updated FROM wp_links WHERE link_visible = ‘Y’ AND link_category
   = 3 ORDER BY link_id ASC LIMIT
 * Thanks a lot.

The topic ‘SQL Error In Using Get Links’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [dyadcore](https://wordpress.org/support/users/dyadcore/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/sql-error-in-using-get-links/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
