Because of SOF people i've been in a position to learn a lot more and learn how to pull information doing LEFT JOIN. Now, i have to pull information from the table after which make use of the user_id from that table to drag the customers full_title in the accounts table. Below may be the code I'm using:


  $query="SELECT * FROM messages_questions ORDER BY id ASC";



  echo "";

   while ($i < $num) {

   $asker = mysql_result($result,$i,"user_id");
   $comp = mysql_result($result,$i,"comp_id");

   echo "<div id=container><br><div id=message>$messages<br>Asked by $asker</div>

    echo "";


How do i tweak it to complete what i wish to do?

More details regarding your tables could be helpful, nevertheless, you need something similar to this:

SELECT whatever
FROM messages_questions AS mq
JOIN accounts AS a
ON mq.user_id = a.user_id

Most likely something similar to

SELECT mq.messages_title,mq.user_id,mq.comp_id, a.full_name
FROM messages_questions mq 
LEFT JOIN accounts a ON a.user_id = mq.user_id