<?php

/**
 * Class that operate on table 'productrequests'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2016-10-16 10:57
 */
class ProductrequestsMySqlExtDAO extends ProductrequestsMySqlDAO {

    public function getRequestsWithString($stringStore, $stringSeen, $deleted) {
        $sql = 'SELECT p.*  , rs.storeName  as requestStoreName , s.storeName
                        FROM productrequests      p
                        join store                rs      on rs.storeId = p.requeststoreid
                        join store                s       on s.storeId  = p.storeid
                        where       deleted = ' . $deleted . '
                         ' . $stringStore . '   ' . $stringSeen . '   ';
        //print_r($sql);

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

?>