我有两个表-home
和posts
;
home.artid
等于posts.id
。
要从id, artid, inde
中选择home
,再从title
中选择posts
home.pos
是slider
的地方:
$items = "";
$st = $db->query("select home.id, home.artid, home.inde
from home
join posts on home.artid = posts.id
where home.pos = 'slider'
order by home.inde asc");
while ($row = $st->fetch()){
$items .= "<div class='slidertitle'>" . $row['posts.title'] . "</div>\n";
}
echo $items;
错误:
未定义索引posts.title...
有帮助吗?
答案 0 :(得分:1)
如果您想选择xcode-select --install
,请选择它
posts.title