MySQL Forums
Forum List  »  Knowledge Base

question about join query
Posted by: sherri guthrie
Date: October 19, 2009 07:11AM

i'm trying to compile data from 2 different tables for a report. this code:

$result4 = mysql_query("select reportequipment.id, equipment.name,reportequipment.qty from reportequipment LEFT JOIN equipment
ON reportequipment.id = equipment.id where webid='$myid'")or die(mysql_error());


$i = 0;
while ( $row = mysql_fetch_array($result4) )
$i++;


returns the row reportequipment.id, but equipment.name is blank.

my results are:

id# name qty
1 (blank) 3

i need :

id# name qty
1 vest 3


thanks for taking the time to assist.

Options: ReplyQuote


Subject
Views
Written By
Posted
question about join query
2446
October 19, 2009 07:11AM
1611
October 19, 2009 03:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.