php query cant figure out the problem
- by Eat
I dont get an error but it does not return me the row values as well.
How can I address the problem?
<?php
//DATABASE
$dbConn = mysql_connect($host,$username,$password);
mysql_select_db($database,$dbConn);
$SQL = mysql_query("SELECT N.*, C.CatID FROM News N INNER JOIN Categories C ON N.CatID = C.CatID WHERE N.Active = 1 ORDER BY DateEntered DESC");
while ( $Result = mysql_fetch_array($SQL) or die(mysql_error())) {
$CatID[] = $Result[CatID];
$NewsName[] = $Result[NewsName];
$NewsShortDesc[] = $Result[NewsShortDesc];
}
// mysql_free_result($Result);
?>
<div class="toparticle">
<span class="section"><?=$CatID[0] ?> </span>
<span class="headline"><?=$NewsName[0] ?></span>
<p><?=$NewsShortDesc[0] ?></p>
</div>