<?php
/**
 * Class that operate on table 'partnertransferbetween'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2021-09-05 00:27
 */
class PartnertransferbetweenMySqlExtDAO extends PartnertransferbetweenMySqlDAO{
    public function queryStringSearch($queryString) {
        $sql = 'SELECT partnertransferbetween.*, a.partnername as partneridformname, b.partnername as partneridtoname
         FROM partnertransferbetween JOIN partner a
         ON partnertransferbetween.partneridfrom = a.partnerid 
         JOIN partner b ON partnertransferbetween.partneridto = b.partnerid 
         where 1 
        ' . $queryString . ' and partnertransferbetween.conditions = 0
         order by partnertransferbetweenid desc';
        $sqlQuery = new SqlQuery($sql);
        return $this->getList($sqlQuery);
    }

    public function loadPartnerwithdrawalById($partnertransferbetweenid) {
        $sql = 'SELECT * FROM partnertransferbetween
         where partnertransferbetweenid =' . $partnertransferbetweenid . '';
        $sqlQuery = new SqlQuery($sql);
        //echo $sql;
        return $this->getRow($sqlQuery);
    }

	
}
?>