Hey,
I am getting a bit lost on how to get information from two different tables.
I have got:
However, I need "contents" to come from the table "swarticles" and not "swnews" when the ID = the subject ID (if you understand that).PHP Code:<?
ob_start();
include("config.php");
$a= mysql_query("SELECT * FROM `swnews` ORDER BY `newsid` DESC LIMIT 5") or die(mysql_error());
while ($b = mysql_fetch_array($a)) {
echo "<br />";
echo $b['subject'] . '</a></b><br /><i>';
echo $b['description'] . '</b></i><br />';
echo $b['contents'] . '</b></i><br />';
}
?>





Reply With Quote
Needed to change id to $b[subject] to $b[newsid].
