Post Indexer

I installed the post indexer & then saw I needed toadd the sql script. I did and went through the steps outlined on this site and got the message " Your sql query has been executed successfully"
Then when I went back to my site
http://www.onlineaor.com it now says error establishing database connection
What have I done?

    Rich

    I have a question regarding getting the tag-posts plugin working with the post-indexer plugin.

    What I am trying to do is have more information that just the Title and content displyed.

    I added the permalink this way...and it works fine

    echo $tmp_title_before;
     echo '<a href="';
    echo substr($tmp_post['post_permalink'],0);
    echo '">';
    echo substr($tmp_post['post_title'],0,$tmp_title_characters);
    echo '</a>';

    but when i try to add the author of the post with...

    echo substr($tmp_post['post_author'],0);

    it shows up as a number instead of the user_nicename.

    I guess my question is how do I get it to display the user_nicename from the tags_post plugin?

    Or how do I get the posts-indexer plugin to pull the user_nicename instead of the number so that I can display it?

    Ideally, I'd love to have a link to the Author, which would require grabbing the author permalink as well, but I'll settle with just displaying the name.

    Any help is appreciated.

    Andrew

    Hiya,

    but when i try to add the author of the post with...

    echo substr($tmp_post['post_author'],0);

    it shows up as a number instead of the user_nicename.

    Two mistakes with that:
    1) The post_author value is a number. It's the user id of the author
    2) Never use the substr function on an id as that may cut the id short and provide you with the wrong id. You're also missing a parameter for that function:
    http://us2.php.net/substr

    What you need to do is run a query to get the username for the post author.

    Something like this:

    $user_login = $wpdb->get_var("SELECT user_login FROM " . $wpdb->users . " WHERE ID = '" . $tmp_post['post_author'] . "'");

    Thanks,
    Andrew