I have just updated Wordpress to the latest version, and have trawled the boards and docs looking for an answer...
This is the select statement I was/am using
<?php echo $link_cats = $wpdb->get_results("SELECTlink_category,link_nameFROM $wpdb->wp_links order bylink_categoryASC");foreach ($link_cats as $link_cat) { ?>
<h3 class="maintitle" >
<?php echo $link_cat->cat_name; ?>
</h3><?php wp_get_links($link_cat->cat_id); ?>
<?php } ?>
And when I run it in PMA it comes out fine (SELECT link_category, link_name FROM wp_links order by link_category asc)
SOOOO
Does anyone know why I keep getting
"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 'order by link_category ASC' at line 1]" at http://www.thegeneva.com ?
I just want to display all of my links in their categories...