I had exactly the same problem,and I may have fixed it, but badly. If it helps, some additional info: I am hosted on dreamhost, and the full error message says:
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 cat_id, cat_name FROM
The problem is in the theme. In my case, the Orchids theme by Sunarayo Hadi. The troublesome command is in sidebar.php.
I just cut out the relevant bit and pasted in a different way of including links from the ocadia theme, where the entire SQL call block is replaced with the line:
<?php if (is_home()) { get_links_list(); } ?>
I found the get_links_list() function in the links.php file in the wp-includes directory. It is a temp fix, because now the links appear but the font style is wrong for the title "blogroll", so I'll have to poke around a bit more.
Aside, I don't know any PHP or MySQL, this is just hackwork from my programming knowledge from elsewhere... if somebody could post a better fix :)