| @@ 183-190 (lines=8) @@ | ||
| 180 | * |
|
| 181 | * @return mixed |
|
| 182 | */ |
|
| 183 | public function deleteElement($listUuid, $elementUuid) |
|
| 184 | { |
|
| 185 | $sql = 'DELETE FROM `'.self::LIST_ELEMENT_TABLE_NAME.'` WHERE `uuid` = :uuid AND `list` = :list'; |
|
| 186 | $stmt = $this->pdo->prepare($sql); |
|
| 187 | $stmt->bindParam(':uuid', $elementUuid); |
|
| 188 | $stmt->bindParam(':list', $listUuid); |
|
| 189 | $stmt->execute(); |
|
| 190 | } |
|
| 191 | ||
| 192 | /** |
|
| 193 | * @param $listUuid |
|
| @@ 427-435 (lines=9) @@ | ||
| 424 | * |
|
| 425 | * @return int |
|
| 426 | */ |
|
| 427 | public function getCounter($listUuid) |
|
| 428 | { |
|
| 429 | $sql = 'SELECT `uuid` FROM `'.self::LIST_ELEMENT_TABLE_NAME.'` WHERE `list` = :list'; |
|
| 430 | $stmt = $this->pdo->prepare($sql); |
|
| 431 | $stmt->bindParam(':list', $listUuid); |
|
| 432 | $stmt->execute(); |
|
| 433 | ||
| 434 | return $stmt->rowCount(); |
|
| 435 | } |
|
| 436 | } |
|
| 437 | ||