File: /home/mostafedeg/public_html/erp/models/mysql/ext/UnitMySqlExtDAO.class.php
<?php
/**
* Class that operate on table 'unit'. Database Mysql.
*
* @author: http://phpdao.com
* @date: 2013-04-06 10:57
*/
class UnitMySqlExtDAO extends UnitMySqlDAO{
public function queryByConditionLimited($value, $start, $end){
$sql = 'SELECT * FROM unit WHERE conditions = ? limit '.$start.', '.$end.'';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->setNumber($value);
return $this->getList($sqlQuery);
}
public function deletetemp($unitid){
$sql = 'UPDATE unit SET conditions = 1 WHERE unitId = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->setNumber($unitid);
return $this->executeUpdate($sqlQuery);
}
public function returndelete($unitid){
$sql = 'UPDATE unit SET conditions = 0 WHERE unitId = ?';
$sqlQuery = new SqlQuery($sql);
$sqlQuery->setNumber($unitid);
return $this->executeUpdate($sqlQuery);
}
}
?>