NewB PHP / mysql Q
| From: | inpho | Date: | Thu, 10 Oct 2002 06:19:06 +0000 |
| Subject: | NewB PHP / mysql Q | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-119526@lists.php.net to get a copy of this message | ||
Hi all,
I need a bit of quick help here....
I've joined 2 tables together with this code here:
$result=mysql_query("select u.id, u.cid, u.lname, u.fname, u.vld, c.id,
c.cname from tblclient u, tblcompany c where u.vld=1 and u.cid = c.id",$db);
then I put it into an array:
while ($row=mysql_fetch_array($result)) {
print "<tr><td>$row[UName]</td><td>$row[FName]
$row[LName]</td>$row[cname]<td></td></tr>";
}
but the $row[xxx] aren't displaying any info, if I put $row[u.unam] it
returns an error. I run the SQL query in phpmyadmin and it runs fine,
returning 2 results
how do I access those results through an array???
- inpho -