wikipoints/ground/models/ArticlePoints.php

22 lines
353 B
PHP

<?php
class ArticlePoints extends Model
{
function __construct($fromArray = array())
{
$this->_tableName_ = 'articlePoints';
parent::__construct($fromArray);
}
static function model()
{
return new self();
}
function deleteByArticle($id)
{
App::DB()->query('DELETE FROM `' . $this->_tableName_ . '` WHERE `articleId` = ' . $id);
}
}