fix sql command

This commit is contained in:
Georg Ehrke 2012-02-18 11:21:07 +01:00
parent 011bc1e764
commit d8734cee02
1 changed files with 2 additions and 2 deletions

View File

@ -27,10 +27,10 @@ class OC_Calendar_Share{
}else{
$group_where .= ' OR ';
}
$group_where .= ' (share = "' . $group . '" and sharetype = "group") ';
$group_where .= ' (share = \'' . $group . '\' AND sharetype = \'group\') ';
$i++;
}
$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ((share = ? AND sharetype = "user") ' . $group_where . ') AND owner <> ?' . ((!is_null($active) && $active)?' AND active = 1':''));
$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ((share = ? AND sharetype = \'user\') ' . $group_where . ') AND owner <> ?' . ((!is_null($active) && $active)?' AND active = 1)':')'));
$result = $stmt->execute(array($userid, $userid));
$return = array();
while( $row = $result->fetchRow()){