Php fetch rows from multiple MySQL tables

Posted by Jon McIntosh on Stack Overflow See other posts from Stack Overflow or by Jon McIntosh
Published on 2010-04-13T05:03:52Z Indexed on 2010/04/13 5:13 UTC
Read the original article Hit count: 301

Filed under:
|

Right now I am fetching all of the rows from one of my tables:

query = "SELECT * FROM thread WHERE threadid = 2 ORDER BY threadid DESC";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);    
if((!is_bool($result) || $result) && $num_rows) {
 while($row = mysql_fetch_array($result))
  {
 $thread = $row['title'];
 $threadID = $row['threadid'];
 $poster = $row['postusername'];
  }

What I want to do is go to another table on my database: "post_display", and get the row 'text' where the threadid = 2.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php