php with mysql - multiple tables
| From: | Shahmat Dahlan | Date: | Mon, 16 Apr 2001 04:29:28 +0000 |
| Subject: | php with mysql - multiple tables | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-8587@lists.php.net to get a copy of this message | ||
I have three tables, whereby I have used a select statement to extract
some of the fields from each and one of the tables.
e.g.
$sqlstmt ="SELECT stock_in.id, equip.equip_type, equip.brand,
equip.model, vendor.name ";
$sqlstmt.="FROM stock_in,equip,vendor ";
$sqlstmt.="WHERE equip.id=equip_id and vendor.id=vendor_id and
equip.equip_type='Network Server'";
$result=mysql_query($sqlstmt);
I know the $sqlstmt query does work. But if I do a mysql_fetch_array and
assign it to a variable called $myrow,
while ($myrow=mysql_fetch_array($result)) {
...
}
how do I display the content array $myrow? When I do a,
printf("%s ", $myrow["equip.equip_type"]);
nothing is visible.
Help?
Thanks in advance.
Shahmat