Esempio n. 1
0
    /**
     * @param Entity_Block $block
     * @return bool
     */
    public function update($block)
    {
        $id = $block->getId();
        $side = $block->getSide();
        $text = $block->getText();
        $is_text = $block->getIs_text();
        $stmt = $this->DB->prepare('UPDATE `site_block` SET
                                    `block_side`=:side,
									`block_text`=:text,
									`block_is_text`=:is_text
                                    WHERE `block_id`=:id');
        $stmt->bindParam(':id', $id);
        $stmt->bindParam(':side', $side);
        $stmt->bindParam(':text', $text);
        $stmt->bindParam(':is_text', $is_text);
        return $stmt->execute();
    }