WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Theme from WordPress has error (6 posts)

  1. Will Taft
    Member
    Posted 7 years ago #

    I am trying to use the brown-10 theme and get the following error message when installing it:

    "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"

    I don't know SQL, (that's why I am using an existing theme), so I can't fix it. The actual line from the theme is included below. Can anyone see what the trouble is?

    Thanks!

    ---------------------------------
    <?php
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    foreach ($link_cats as $link_cat) {
    ?>

  2. Samuel B
    moderator
    Posted 7 years ago #

    The theme needs updating for 2.1.
    Check theme author's website for an updated theme.

  3. Will Taft
    Member
    Posted 7 years ago #

    Thanks for the answer! I actually looked through all the themes and this was definitely the one I liked best, so hope there is an update. I did eliminate a bunch only because they were of the more common type that only use the middle two thirds of the screen. I may have to revisit my decision on those.

    Is there a technical reason most of them are set up that way? Do some browsers require it? Or do the full screen themes only work perfectly on a wide-screen monitor?

  4. Samuel B
    moderator
    Posted 7 years ago #

    A quick fix is to look in your sidebar.php file for the template tags
    wp_get_lists
    or similar and replace them with
    wp_list_bookmarks.

  5. Will Taft
    Member
    Posted 7 years ago #

    Thanks again for your effort to help! It's a short file and does not seem to contain anything like what you show in your post. Below is the entire text of the file.

    ----------------------------------------------------

    <div id="sidebar">

    <h1><?php bloginfo('name'); ?></h1>

    <form id="searchform" method="get" action="<?php bloginfo('home'); ?>">
    <p>
    <input id="search" type="text" class="searchbox" name="s" value="Search" onblur="setTimeout('closeResults()',2000); if (this.value == '') {this.value = 'Search';}" onfocus="if (this.value == 'Search') {this.value = '';}" />
    </p>
    </form>

    <ul id="navigation">
    <li class="page_item<?php if(is_home()) echo ' current_page_item' ?>">">Blog
    <?php wp_list_pages('title_li=' ); ?>

    <?php
    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    foreach ($link_cats as $link_cat) {
    ?>
    <h3><?php echo $link_cat->cat_name; ?></h3>
    <ul class="links">
    <?php wp_get_links($link_cat->cat_id); ?>

    <?php } ?>

    <?php if(is_home()) { ?>

    <h3>Syndication</h3>

    <ul class="syn">

  6. ">Entries
  7. ">Comments
  8. <?php } ?>

    </div>

  • Will Taft
    Member
    Posted 7 years ago #

    Well, I worked on this error for a while today and could not get it fixed. Just not proficient enough in the details. The author has not updated it for the latest version of WP, so I guess I am out of luck using it.

    I looked through all the themes again today and it is amazing that with all of them, I can't find one I really like! Picky me, I guess. Also strange that some of the one column themes have sidebars etc that actually make them look like 2 or 3 column themes and some 3 column themes are just one column. Guess I don't understand the terminology.

    edit: Also strange the way this post has the text centered in a weird way?

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.