Hello All,
I have this string defined for my query and it shows the different types of
categories fine, but when I change a.categoryid = c.categoryid to
a.categoryid = 1 which is only one of the categories
It shows me the same record twice.
$query = "select a.startdate, a.articleid, c.name, a.title, a.intro,
a.datecreated from articles as a, categories as c where (a.startdate = -1 or
a.startdate <= {$now}) and (a.enddate = -1 or a.enddate >= {$now}) and
a.categoryid = c.categoryid order by a.startdate DESC";
while ( $row = mysql_fetch_array($res) ) {
$tpldata['articles'][] = array(
'title' => $row['title'],
'intro' => makeLinks($row['intro']),
'id' => $row['articleid'],
'categoryname' => $row['name'],
'created' => date('n/j/Y',
$row['datecreated'])
);
//echo $row['datecreated'];
}
Any Ideas???
Thanks!