HEX
Server: Apache
System: Linux server1.royalgt4.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
User: mostafedeg (1125)
PHP: 5.6.40
Disabled: mail,passthru,parse_ini_file,show_source,eval,assert,pcntl_exec,dl,putenv,proc_open,popen
Upload Files
File: /home/mostafedeg/public_html/erp/models/mysql/ext/ProductionrateMySqlExtDAO.class.php
<?php

/**
 * Class that operate on table 'productionrate'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2014-04-01 11:09
 */
class ProductionrateMySqlExtDAO extends ProductionrateMySqlDAO {

    public function queryOneRateByfinalName($id) {
        $sql = 'SELECT * FROM productionrate WHERE finalName = ?';
        $sqlQuery = new SqlQuery($sql);
        $sqlQuery->setNumber($id);
        return $this->getRow($sqlQuery);
    }

    public function queryAllRateByfinalNameSC($id) {
        $sql = 'SELECT productionrate.*, product.productName,productcat.productCatName
                ,productSellAllPrice,productSellHalfPrice,productSellUnitPrice
                ,size.name as sizeName,color.name as colorName
                FROM productionrate
                join product on productionrate.finalName = product.productId
		JOIN productcat
                        ON product.productCatId = productcat.productCatId
                left join sizecolor as size on size.id=productionrate.sizeid
                left join sizecolor as color on color.id=productionrate.colorid
                WHERE finalName = ?';
        $sqlQuery = new SqlQuery($sql);
        $sqlQuery->setNumber($id);
        return $this->getList($sqlQuery);
    }

    public function deleteByfinalName($id) {
        $sql = 'DELETE FROM productionrate WHERE finalName = ?';
        $sqlQuery = new SqlQuery($sql);
        $sqlQuery->setNumber($id);
        return $this->executeUpdate($sqlQuery);
    }

    public function queryAllProductEquation($id) {
        $sql = 'SELECT productionrate.* , product.productName, product.productId FROM productionrate,product where productionrate.finalName = product.productId and conditions=0';
        $sqlQuery = new SqlQuery($sql);
        return $this->getList($sqlQuery);
    }

}

?>