database error
-
hello…im new to WordPress, but have done rather well in customizing it to my liking. the only problem im having is the im getting an error message in my sidebar that im not familiar with.
here is 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 cat_id, cat_name FROM…and the page it is found on…
https://flyerflies.com/blogs/The_FlyerFly/
…here is the code from my sidebar.php file…
[code]
<div class="sidebar">
<h2><?php _e('Categories'); ?></h2>
<ul class="menu">
<?php wp_list_cats('sort_column=name'); ?><?php wp_list_pages('sort_column=menu_order&title_li=<h2>' . __('Pages') . '</h2>' ); ?>
<?php /* If this is a category archive */ if (is_single()) { ?>
<h2><?php _e('Archives'); ?></h2>-
<?php wp_get_archives('type=monthly&show_post_count=0'); ?>
<?php } ?>
<h2><?php _e('Search'); ?></h2>
<form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
<input type="text" name="s" id="s" size="15" />
<input type="submit" name="submit" value="<?php _e('Search'); ?>" />
</form><?php if (is_home()) { ?>
<?php
$link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
foreach ($link_cats as $link_cat) {
?>
<h2><?php echo $link_cat->cat_name; ?></h2>-
<?php wp_get_links($link_cat->cat_id); ?>
<?php } ?>
<?php } ?><h2><?php _e('Latest'); ?></h2>
-
<?php wp_get_archives('type=postbypost&limit=6'); ?>
<?php if (is_home()) { ?>
<?php if (function_exists('wp_theme_switcher')) { ?>
<h2>Styleswitcher</h2>
<?php wp_theme_switcher(); ?>
<?php } ?><h2><?php _e('Meta:'); ?></h2>
<ul class="noli">
<?php wp_register(); ?>- <?php wp_loginout(); ?>
- " title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('RSS'); ?>
- " title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments RSS'); ?>
- "><?php _e('Valid XHTML'); ?>
- XFN
<?php wp_meta(); ?>
<?php } ?>
</div>
[/code]…i am using MySQL version 4.1.20-max-log, and phpMyAdmin for databasing. but i am by no means a databasing or PHP expert. my layout was based on another theme, but i checked and the original theme produced the same error. my problem is that i dont know nearly enough about PHP syntax to recognize the conflict here.
can someone point out the issue in my code??
thanks in advance.
- The topic ‘database error’ is closed to new replies.