我试图显示登录用户所关注的艺术家的状态更新列表。通过mysqli结果循环
到目前为止,我有这样的:
#Get the list of artists that the user has liked
$q = "SELECT * FROM artist_likes WHERE user_id = '1' ";
$r = mysqli_query($dbc,$q);
while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) {
#Now grab the statuses for each artist
$status_query = "SELECT * FROM status_updates WHERE artist_id = '".$row['artist_id']."' ";
$status_result = mysqli_query($dbc,$status_query)
}
,但我不知道如何来遍历并显示返回的状态更新?
这不是我的强项,所以任何指针都将不胜感激!
使用内循环的同时,像你遍历第一个查询的结果。 – Achrome