
16/12/2010, 14:18
|
| | Fecha de Ingreso: febrero-2010
Mensajes: 818
Antigüedad: 15 años, 1 mes Puntos: 55 | |
Respuesta: Solo 1 resultado tras consulta 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"; |