• I was browsing through the wiki, and decided to experiment. I inserted this tag <?php get_linksbyname(); ?> and it worked perfectly. However, once I tired to enter in any peremeters, it mucked up. I even tried <?php get_linksbyname('','','','','','','','','',''); ?> which should have worked, yes? I instead, as with the other tries, recived this: 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 FROM wp_links WHERE link_visible = 'Y' ORDER BY link_id ASC LIMIT

    Any ideas why?
    Thanks! ^.^

Viewing 2 replies - 1 through 2 (of 2 total)
  • You will have to feed it some useful parameters. Not all parameters are strings, some are numbers and they are all explained in the wiki documentation. In your example you have set LIMIT to '' which is an error because it has to be a number. Looks like WP doesn’t check for valid parameter types but this may be a performance consideration. The best way is to start with the default values also described in the wiki docs and modify them until they fit your needs.

    Thread Starter pvicnan

    (@pvicnan)

    ah.. thank you! ^.^

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