$sql2 = “
select *
from article_table at
join ( select uid
from user_table
where type = '1' ) ut
on at.uid = ut.uid
where image != ''
group by at.uid
order by rand()
limit 10”
$result2 = mysql_query($sql2);
while($row2 = mysql_fetch_array($result2)){
echo $row2['image'];//可以获取 article_table.image 的值
//如何获取 user_table.birthday 的值?
}
select *
from article_table at
join ( select uid,birthday
from user_table
where type = '1' ) ut
on at.uid = ut.uid
where image != ''
group by at.uid
order by rand()
limit 10”