OK, I have just tried:
<?php mysql_select_db($database_FCK2, $FCK2);
$query_rsort_desc = "SELECT numbers.id, numbers.`number` FROM numbers ORDER BY numbers.id DESC LIMIT 10";
$rsort_desc = mysql_query($query_rsort_desc, $FCK2) or die(mysql_error());
$row_rsort_desc = mysql_fetch_assoc($rsort_desc);
$totalRows_rsort_desc = mysql_num_rows($rsort_desc);
$Ids = array();
while ($row = mysql_fetch_assoc($idResult)) {
$postIds[] = $row['id'];
}
$Ids = implode(", ", $Ids);
mysql_select_db($database_FCK2, $FCK2);
$query_rsort_asc = "SELECT numbers.id, numbers.`number` FROM numbers WHERE id IN({$Ids}) ORDER BY numbers.id ASC";
$rsort_asc = mysql_query($query_rsort_asc, $FCK2) or die(mysql_error());
$row_rsort_asc = mysql_fetch_assoc($rsort_asc);
$totalRows_rsort_asc = mysql_num_rows($rsort_asc); ?>
However, returned:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/thefood/public_html/rsort2.php on line 43
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY numbers.id ASC' at line 1
Any ideas??