【发布时间】:2015-04-27 06:58:22
【问题描述】:
我有两个表,第一个是帖子,其中有post_by 和post coloumns,第二个是connectionstbl,其中有memberid 并与之连接,其中member 是登录用户,connectedWith是朋友
如何获取post_by=the connectedwith的post coloumn where的数据
以下查询:
$result=mysql_query("
select
social_posts.posted_by,
social_posts.post as social_posts_post connectionstbl.connectedwith
from
social_posts,connectionstbl
where
social_posts.posted_by = connectionstbl.connectedwith
order by social_posts.p_id desc
");
while ($row =mysql_fetch_array($result))
{
echo $row['social_posts_post']."<br/>";
}
?>
执行查询没有任何输出。
【问题讨论】:
-
您能否正确格式化您的查询...
-
请正确格式化您的查询并提供适当的表结构,以便我们为您提供帮助