是否有一种“优雅的方式”从用户的每个相册中获取最后 3 张照片?我试过使用这个多查询,但它不起作用:
$fqls = array(
"q1" => "SELECT aid FROM album WHERE owner = $page_id",
"q2" => "SELECT src_small,created FROM photo WHERE aid IN (SELECT aid FROM #q1) ORDER BY created DESC LIMIT 3"
);
是否有一种“优雅的方式”从用户的每个相册中获取最后 3 张照片?我试过使用这个多查询,但它不起作用:
$fqls = array(
"q1" => "SELECT aid FROM album WHERE owner = $page_id",
"q2" => "SELECT src_small,created FROM photo WHERE aid IN (SELECT aid FROM #q1) ORDER BY created DESC LIMIT 3"
);