Matching IDs in two different tables
<p>I have two tables; NEWS and CATEGORIES. In the NEWS table, there is CatID field which matches with CatID table in the categories. I get the categoryID with the following code but I want to the category name of the news, not the ID. How can I pull it from the categories table?</p>

<pre><code>&lt;?php 

 $SQL =  mysql_query("SELECT * FROM News WHERE Active = 1 ORDER BY DateEntered DESC");

   while ( $Result = mysql_fetch_array($SQL)) {
 $CatID[] = $Result[CatID];
 $NewsName[] = $Result[NewsName];
 $NewsShortDesc[] = $Result[NewsShortDesc];
 }
?&gt;

                &lt;div class="toparticle"&gt;
                    &lt;span class="section"&gt;&lt;?=$CatID[0] ?&gt; &lt;/span&gt;
                    &lt;span class="headline"&gt;&lt;?=$NewsName[0] ?&gt;&lt;/span&gt;
                    &lt;p&gt;&lt;?=$NewsShortDesc[0] ?&gt;&lt;/p&gt;
                &lt;/div&gt;
</code></pre>
