Forum Moderators: open
$category_id = $_GET['category_id'];
$sql = "
SELECT * FROM `cms_news_blog_categories`,`cms_news_blog_entry`
WHERE
`cms_news_blog_categories`.`id` = ".$category_id."
AND
`cms_news_blog_entry`.`category_id` = `cms_news_blog_categories`.`id`
ORDER BY `timestamp` DESC
";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
$id = $row['id'];
$title = $row['title'];
$timestamp = $row['timestamp'];
$name = $row['name'];
}
$f=count(@first_fields);
$s=count(@second_fields);
$total_fields = $f+$s;
while ($row=mysql_fetch_array($results)) {
echo "<tr>";
for ($i=0;$i<$f;$i++) {
echo "<td>" . $row[$i] . "</td>";
}
// Note we SKIP the second id field by starting at $f+1
for ($i=$f+1;$i<$total_fields;$i++) {
echo "<td>" . $row[$i] . "</td>";
}
echo </tr>";
}
So lastly, rocknbil, what is the @first_fields