mysql console' da şu sorgu çalışıyor : SELECT cases. id, cases. uid, cases. age, cases. gender, cases. history, cases. archive, cases. slide_img FROM cases LEFT JOIN share_pathologist AS sp ON cases. case_id = sp. case_id LEFT JOIN share_group AS sg ON sp. case_id = sg. case_id WHERE sp. pathologist_id = '26' OR sg. group_id IN (SELECT group_id FROM user_group WHERE state = 'joined' AND user_id = '26'); Php dosyasında : $sql = "SELECT cases. id, cases. uid, cases. age, cases. gender, cases. history, cases. archive, cases. slide_img FROM cases LEFT JOIN share_pathologist AS sp ON cases. case_id = sp. case_id LEFT JOIN share_group AS sg ON sp. case_id = sg. case_id WHERE sp. pathologist_id = ? OR sg. group_id IN "; $query = $this->db->prepare ; $query->execute(array ; Bu sorgu false dndürüyor, çağırdığım test. php : require "includes/database. php"; require "classes/C_Case. php"; $o = new Cases; var_dump($o->getAllSharedCases("26")); pdo' da hatalı birşeyler var da bulamadım. ozgunlu tarafından 23/Ara/15 15:34 tarihinde düzenlenmiştir Hello, i am nothing. I come from Neverland.

public function getAllSharedCases { $sql = "SELECT FROM cases INNER JOIN share_pathologist AS sp ON cases. case_id = sp. case_id INNER JOIN share_group AS sg ON cases. case_id = sg. case_id WHERE sp. pathologist_id = ? OR sg. group_id = "; $query = $this->db->prepare ; $query->execute(array ; if($query->rowCount { $cases = $query->fetchAll ; for ($i = 0; $i < count ; $i++) return $cases; } return false; } Sorgudaki hata nerede? Direk false dndürüyor. Tablo yapıları : share_pathologist : id - case_id - pathologist_id share_group : id - case_id - group_id user_group : id - user_id - group_id - state ozgunlu tarafından 23/Ara/15 14:45 tarihinde düzenlenmiştir Hello, i am nothing. I come from Neverland.

if($query->rowCount demişin $query->rowCount boolean mi dnüyor? count dediğine gre boolean değil if($query->rowCount > 0) şeklinde denermisin snnyk tarafından 23/Ara/15 15:04 tarihinde düzenlenmiştir snnyk.com - code is poetry all that i know...