@@ 145-152 (lines=8) @@ | ||
142 | * |
|
143 | * @return mixed |
|
144 | */ |
|
145 | public function deleteElement($listUuid, $elementUuid) |
|
146 | { |
|
147 | $sql = 'DELETE FROM `'.self::LIST_ELEMENT_TABLE_NAME.'` WHERE `uuid` = :uuid AND `list` = :list'; |
|
148 | $stmt = $this->pdo->prepare($sql); |
|
149 | $stmt->bindParam(':uuid', $elementUuid); |
|
150 | $stmt->bindParam(':list', $listUuid); |
|
151 | $stmt->execute(); |
|
152 | } |
|
153 | ||
154 | /** |
|
155 | * @param $listUuid |
|
@@ 389-397 (lines=9) @@ | ||
386 | * |
|
387 | * @return int |
|
388 | */ |
|
389 | public function getCounter($listUuid) |
|
390 | { |
|
391 | $sql = 'SELECT `uuid` FROM `'.self::LIST_ELEMENT_TABLE_NAME.'` WHERE `list` = :list'; |
|
392 | $stmt = $this->pdo->prepare($sql); |
|
393 | $stmt->bindParam(':list', $listUuid); |
|
394 | $stmt->execute(); |
|
395 | ||
396 | return $stmt->rowCount(); |
|
397 | } |
|
398 | ||
399 | /** |
|
400 | * creates database schema. |