<?php
/**
 * Class that operate on table 'typesupplier'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2020-11-11 22:19
 */
class TypesupplierMySqlExtDAO extends TypesupplierMySqlDAO{

    public function deletetemp($clientid) {

        $sql = 'UPDATE typesupplier SET conditions = 1
		        WHERE typeId =' . $clientid . ' ';
        $sqlQuery = new SqlQuery($sql);
        return $this->executeUpdate($sqlQuery);
    }


    public function returndelete($clientid) {

        $sql = 'UPDATE typesupplier SET conditions = 0
		        WHERE typeId =' . $clientid . ' ';
        $sqlQuery = new SqlQuery($sql);
        return $this->executeUpdate($sqlQuery);
    }

    public function queryAllsup() {
        $sql = 'SELECT * FROM typesupplier WHERE conditions=0 ORDER BY typeId DESC  ';
        $sqlQuery = new SqlQuery($sql);
        return $this->getList($sqlQuery);
    }


}
?>