Cita:
Iniciado por Death_Empire
while($row1 = mysql_fetch_array($res1)) {
$first_post = $row1['topic_first_post_id'];
}
ese while solo te guarda la ultima id que haces en el select
prueba guardando en un arreglo
while($row1 = mysql_fetch_array($res1)) {
$first_post[] = $row1['topic_first_post_id'];
}
luego haces un implode
$ids = implode("','",$first_post);
y luego en la segunda consulta preguntas con un IN
sql = "SELECT * FROM phpbb_posts WHERE post_id IN ('". $ids ."') ORDER BY post_time DESC LIMIT 0,3";
Muchas gracias! funciona perfectamente