• something must be wrong with my syntax. here it is:

    <?php get_links(2, '<li>', '</span></li>', '<br /><span>', TRUE, '_updated', TRUE, '','', TRUE); ?>

    and I’m getting this error on my page:

    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 4]
    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 , UNIX_TIMESTAMP(link_updated) AS link_updated_f FROM wp_links WHERE link_visible = 'Y' AND link_category = 2 ORDER BY link_updated DESC LIMIT

    or lordy, what have I done now?

    thank you for any help,
    will

Viewing 2 replies - 1 through 2 (of 2 total)
  • try this, instead:
    <?php
    get_links(2, '<li>', '</span></li>', '<span>', TRUE, '_updated', TRUE, -1, FALSE, TRUE);
    ?>

    See the get_links documentation for the full parameter list.

    Thread Starter syrupcore

    (@syrupcore)

    Thanks skippy(!) but, I still get the same error. I’ve poured over the get_links page in the codex. I dunno wassup.

    Also weird is that if I use this:
    <?php get_links(2, '<li>', '</span></li>', '<br /><span>', true, '_updated', true); ?>

    I get no error but a) there’s no date on them (it looks like that’s to be on by default) and b) ‘_updated’ isn’t doing what I expected which is to list the links in order they were added.

    Any other ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_links sql error’ is closed to new replies.