0

以下查询应返回 3 个结果,但返回零。该following表具有所有必要的行,这些行应与strings表中的行连接以产生 3 个结果。你能在查询中发现任何错误吗?

$getdash = $connectdb->prepare(
  "SELECT parent.* 
   FROM `strings` as parent 
   JOIN `following` ftable 
   ON ftable.userid=:userid
   WHERE ((ftable.sid=parent.sid AND ftable.page='1') 
    OR (ftable.sid=parent.sid AND ftable.position=parent.position AND ftable.page='0') 
    OR (ftable.profile=parent.starter)) ");

$executequery = $getdash->execute(array(":userid"=>16));

$found = $getdash->rowCount();
4

0 回答 0