示例#1
0
 public function get_records_join($where_params = array(), $order_params = array())
 {
     $ObjQuery = new queryModel();
     $where = $ObjQuery->where_params($where_params);
     $order = $ObjQuery->orberby_params($order_params);
     $query = "SELECT" . " `j`.`" . $this->tblid . "`," . " `j`.`" . $this->tblpref . "license_no`," . " `j`.`" . $this->tblpref . "estimator_fullname`," . " `j`.`" . $this->tblpref . "estimator_phone`," . " `j`.`" . $this->tblpref . "estimator_email`," . " `j`.`" . $this->tblpref . "estimator_website`," . " `j`.`" . $this->tblpref . "estimator_address`," . " `j`.`" . $this->tblpref . "estimator_zipcode`," . " `j`.`" . $this->tblpref . "estimator_city`," . " `j`.`" . $this->tblpref . "commentary`," . " `j`.`" . $this->tblpref . "classifications`," . " `j`.`" . $this->tblpref . "trades`," . " `j`.`" . $this->tblpref . "vendor1`," . " `j`.`" . $this->tblpref . "vendor2`," . " `j`.`" . $this->tblpref . "vendor3`," . " `j`.`" . $this->tblpref . "status`," . " `j1`.`" . $this->tblid1 . "`," . " `j1`.`first_name` AS `" . $this->tblpref1 . "firstname`," . " `j1`.`midini` AS `" . $this->tblpref1 . "midini`," . " `j1`.`last_name` AS `" . $this->tblpref1 . "lastname`," . " `j1`.`address1` AS `" . $this->tblpref1 . "address1`," . " `j1`.`address2` AS `" . $this->tblpref1 . "address2`," . " `j1`.`city` AS `" . $this->tblpref1 . "city`," . " `j1`.`state_code` AS `" . $this->tblpref1 . "state_code`," . " `j1`.`zipcode` AS `" . $this->tblpref1 . "zipcode`," . " `j1`.`email_address` AS `" . $this->tblpref1 . "email`," . " `j1`.`password` AS `" . $this->tblpref1 . "password`," . " `j1`.`secret_question` AS `" . $this->tblpref1 . "secret_question`," . " `j1`.`secret_answer` AS `" . $this->tblpref1 . "secret_answer`," . " `j1`.`office_phone` AS `" . $this->tblpref1 . "office_phone`," . " `j1`.`mobile_phone` AS `" . $this->tblpref1 . "mobile_phone`," . " `j1`.`home_phone` AS `" . $this->tblpref1 . "home_phone`," . " `j1`.`use_company_address` AS `" . $this->tblpref1 . "use_company_address`," . " `j2`.`" . $this->tblid2 . "`," . " `j2`.`company_name` AS `" . $this->tblpref2 . "name`," . " `j2`.`address1` AS `" . $this->tblpref2 . "address1`," . " `j2`.`address2` AS `" . $this->tblpref2 . "address2`," . " `j2`.`city` AS `" . $this->tblpref2 . "city`," . " `j2`.`state_code` AS `" . $this->tblpref2 . "state_code`," . " `j2`.`zipcode` AS `" . $this->tblpref2 . "zipcode`," . " `j2`.`office_phone` AS `" . $this->tblpref2 . "office_phone`," . " `j2`.`fax_number` AS `" . $this->tblpref2 . "fax_number`," . " `j2`.`county` AS `" . $this->tblpref2 . "county`," . " `j2`.`office_email` AS `" . $this->tblpref2 . "office_email`" . " FROM `" . $this->tblname . "` AS `j`" . " INNER JOIN `" . $this->tblname1 . "` AS `j1`" . " ON `j`.`" . $this->tblid1 . "`=`j1`.`" . $this->tblid1 . "`" . " INNER JOIN `" . $this->tblname2 . "` AS `j2`" . " ON `j1`.`" . $this->tblid1 . "`=`j2`.`" . $this->tblid2 . "`" . $where . $order;
     $rows = DB::select($query);
     return $rows;
 }
示例#2
0
 public function get_records_join($where_params = array(), $order_params = array())
 {
     $ObjQuery = new queryModel();
     $where = $ObjQuery->where_params($where_params);
     $order = $ObjQuery->orberby_params($order_params);
     $query = "SELECT" . " `j`.`" . $this->tblid . "`," . " `j`.`paskr_company_id`," . " `j`.`first_name` AS `" . $this->tblpref . "firstname`," . " `j`.`midini` AS `" . $this->tblpref . "midini`," . " `j`.`last_name` AS `" . $this->tblpref . "lastname`," . " `j`.`address1` AS `" . $this->tblpref . "address1`," . " `j`.`address2` AS `" . $this->tblpref . "address2`," . " `j`.`city` AS `" . $this->tblpref . "city`," . " `j`.`state_code` AS `" . $this->tblpref . "state_code`," . " `j`.`zipcode` AS `" . $this->tblpref . "zipcode`," . " `j`.`email_address` AS `" . $this->tblpref . "email`," . " `j`.`password` AS `" . $this->tblpref . "password`," . " `j`.`secret_question` AS `" . $this->tblpref . "secret_question`," . " `j`.`secret_answer` AS `" . $this->tblpref . "secret_answer`," . " `j`.`office_phone` AS `" . $this->tblpref . "office_phone`," . " `j`.`use_company_address` AS `" . $this->tblpref . "use_company_address`," . " `j`.`" . $this->tblpref . "status`," . " `j1`.`company_id`," . " `j1`.`company_name` AS `" . $this->tblpref1 . "name`," . " `j1`.`address1` AS `" . $this->tblpref1 . "address1`," . " `j1`.`address2` AS `" . $this->tblpref1 . "address2`," . " `j1`.`city` AS `" . $this->tblpref1 . "city`," . " `j1`.`state_code` AS `" . $this->tblpref1 . "state_code`," . " `j1`.`zipcode` AS `" . $this->tblpref1 . "zipcode`," . " `j1`.`office_phone` AS `" . $this->tblpref1 . "office_phone`," . " `j1`.`fax_number` AS `" . $this->tblpref1 . "fax_number`," . " `j1`.`county` AS `" . $this->tblpref1 . "county`," . " `j1`.`office_email` AS `" . $this->tblpref1 . "office_email`" . " FROM `" . $this->tblname . "` AS `j`" . " INNER JOIN `" . $this->tblname1 . "` AS `j1`" . " ON `j`.`company_id`=`j1`.`company_id`" . $where . $order;
     $rows = DB::select($query);
     return $rows;
 }
示例#3
0
 public function get_records_in_id($trade_id_array, $order_params = array())
 {
     $ObjQuery = new queryModel();
     $where = $ObjQuery->where_params(array('`' . $this->tblid . '` IN ' => "('" . implode("','", $trade_id_array) . "')"), 'AND', '');
     $order = $ObjQuery->orberby_params($order_params);
     $query = "SELECT *" . " FROM `" . $this->tblname . "`" . $where . $order;
     $rows = DB::select($query);
     return $rows;
 }
示例#4
0
 public function get_records_join($where_params = array(), $order_params = array())
 {
     $ObjQuery = new queryModel();
     $where = $ObjQuery->where_params($where_params);
     $order = $ObjQuery->orberby_params($order_params);
     $query = "SELECT *" . " FROM `" . $this->tblname . "` AS `j`" . " INNER JOIN `" . $this->tblname1 . "` AS `j1`" . " ON `j`.`" . $this->tblid1 . "`=`j1`.`" . $this->tblid1 . "`" . $where . $order;
     $rows = DB::select($query);
     return $rows;
 }
 public function get_records_join($where_params = array(), $order_params = array())
 {
     $ObjQuery = new queryModel();
     $where = $ObjQuery->where_params($where_params);
     $order = $ObjQuery->orberby_params($order_params);
     $query = "SELECT" . " `j`.`" . $this->tblid . "`," . " `j`.`column1`," . " `j`.`column2`," . " `j`.`column3`," . " `j`.`column4`," . " `j`.`column5`," . " `j`.`column6`," . " `j`.`column7`," . " `j`.`column8`," . " `j`.`column9`," . " `j`.`column10`," . " `j`.`" . $this->tblpref . "date_created`," . " `j1`.`" . $this->tblid1 . "`," . " `j1`.`" . $this->tblid2 . "`," . " `j1`.`" . $this->tblpref1 . "filename`," . " `j1`.`" . $this->tblpref1 . "filepath`," . " `j1`.`" . $this->tblpref1 . "header_detect`," . " `j1`.`" . $this->tblpref1 . "header_format`" . " FROM `" . $this->tblname . "` AS `j`" . " INNER JOIN `" . $this->tblname1 . "` AS `j1`" . " ON `j`.`" . $this->tblid1 . "`=`j1`.`" . $this->tblid1 . "`" . $where . $order;
     $rows = DB::select($query);
     return $rows;
 }
示例#6
0
 public function delete_data($where_params)
 {
     $ObjQuery = new queryModel();
     $result = '';
     $where = $ObjQuery->where_params($where_params);
     if ($where) {
         $query = "DELETE " . " FROM `" . $this->tblname . "`" . $where;
         $result = DB::delete($query);
     }
     return $result;
 }