Forum Moderators: coopster
I need a little help with echoing a value by joining 2 tables.
Table 1 has these fields,
id, name, username
Table2,
id, subject, short, and username.
The username in table2 = username @ table1.
I want to join those 2 tables and echoing value in the name field inside table1.
$query_nameu = "SELECT table1.username, table2.username ".
"FROM table1, table2 ".
"WHERE table1.username = table2.username";
$result = mysql_query($query_nameu) or die(mysql_error());
Anything like this?
<?php echo $query_nameu['name']; ?>
Thanks in advance.