I have the following:
$sql = "SELECT c.category_name
, c.category_name_url
FROM blog_categories AS c
JOIN blog_articles AS a
ON a.category_name = c.category_name
WHERE c.category_status = 'online'
GROUP BY c.category_name
";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
$category_name = $row['c']['category_name'];
$category_name_url = $row['c']['category_name_url'];
}
But it's not working (generating blanks). I'm sure I'm doing something wrong, but I don't know what the formal terms of what I'm looking for is so Google is no help =/.