<?php

/**
 * Class that operate on table 'otherstoremovement'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2014-05-11 13:57
 */
class OtherstoremovementMySqlExtDAO extends OtherstoremovementMySqlDAO {

    public function queryAllEX($queryString) {
        $sql = 'SELECT otherstoremovement.* FROM otherstoremovement
		WHERE    id not in( SELECT  `deloperation`
FROM  `otherstoremovement`)
' . $queryString . '
		';
        $sqlQuery = new SqlQuery($sql);
        return $this->getList($sqlQuery);
    }

    public function updatedel($del, $id) {
        $sql = 'UPDATE otherstoremovement SET del = ' . $del . '  WHERE id =' . $id . '';
        $sqlQuery = new SqlQuery($sql);


        return $this->executeUpdate($sqlQuery);
    }

    public function updateoprationnumber($oprationnumber, $id) {
        $sql = 'UPDATE otherstoremovement SET oprationnumber = "' . $oprationnumber . '"  WHERE id =' . $id . '';
        $sqlQuery = new SqlQuery($sql);


        return $this->executeUpdate($sqlQuery);
    }

    public function getAutoIncrementValue($DBName) {
        $sql = 'SELECT `AUTO_INCREMENT`
                FROM  INFORMATION_SCHEMA.TABLES
                WHERE TABLE_SCHEMA = "' . $DBName . '"
                AND   TABLE_NAME   = "otherstoremovement" ';

        $sqlQuery = new SqlQuery($sql);
        return $this->querySingleResult($sqlQuery);
    }

}

?>