Hello! 🙂
I need to take data from two(!) tables, if possible.
I do have this code which works fine:
$Query = "SELECT * FROM addressbook WHERE memberid LIKE '$memberid' ORDER BY id;" or die (mysql_error());
$Result = mysql_query($Query) or die("Error: ".mysql_error()." in query: ".$Query);
if( mysql_num_rows( $Result ) == 0 ){
echo "Address book is emnty";
}
while($Row=mysql_fetch_array($Result)){
print "<B>$Row[orgid]</B><br>";
}
mysql_close($Link);
But instead of print the "orgid" numbers, I would like to print the names of the org(anisations).
The organisation names is in the "organisations" table, with the columnname "orgname", and another column is namned "orgid" (that is the same is as in the code above). orgid is a primary key here I belive.
Hope anyone understands. Feel free to ask if anything is unclear.
Thanks.