in reply to Script won't retrieve messages column

$sth->execute( $msg_id, $msg_id);

shouldn't you have two different variables there?

Replies are listed 'Best First'.
Re: Re: Script won't retrieve messages column
by stonecolddevin (Parson) on Jul 11, 2003 at 23:20 UTC
    Well, I'm not totally sure, because most of the SQL is out of a forum builder book, so I'm not 100% sure on that, I'll go back and check, otherwise I'll have to re-write the SQL stuff then.

    And if you're feeling lucky... come and take me home And if you feel loved If you feel lucky, if you feel loved If you feel lucky, if you feel loved You've crossed the walls - Excelled Further along through their hell All for my heart, I watch you kill You always have, you always will Now spread your wings and sail out to me....
      Well, I'm not totally sure, because most of the SQL is out of a forum builder book, so I'm not 100% sure on that, I'll go back and check, otherwise I'll have to re-write the SQL stuff then.

      Well if messages.id or thread_id are the same thing then it shouldnt matter, but most likely the thread id is just the parent message id to keep track of threads that are related...i doubt this is your problem

      being that this is code from a book, have you verified that your db tables messages or forums have a messages.* field? maybe by making a single simple query for fields that start with messages.?
      -Robert

      Hopefully there will be a witty sig here at some point