PicoDb update

This commit is contained in:
Frederic Guillot
2015-06-27 00:00:43 -04:00
parent 7a22f4c6d4
commit 1823430d13
18 changed files with 28 additions and 28 deletions

View File

@@ -39,7 +39,7 @@ class ProjectIntegration extends Base
*/
public function saveParameters($project_id, array $values)
{
if ($this->db->table(self::TABLE)->eq('project_id', $project_id)->count() === 1) {
if ($this->db->table(self::TABLE)->eq('project_id', $project_id)->exists()) {
return $this->db->table(self::TABLE)->eq('project_id', $project_id)->update($values);
}
@@ -61,6 +61,6 @@ class ProjectIntegration extends Base
->table(self::TABLE)
->eq('project_id', $project_id)
->eq($option, $value)
->count() === 1;
->exists();
}
}