| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/models/ |
Upload File : |
<?php
/**
* Copyright 2013 Catabatic Automation Technology Pvt Ltd.
* All rights reserved
*
* @description: Travel_Model_TblCustomer.php, Leads Model. 2016/07/08 12:07
* @author: Shakti Rana <shakti@catpl.co.in>
*/
include_once 'BaseModel.php';
class Travel_Model_TblCustomer extends BaseModel{
/**
* Add Customer.
*
* @param string $tableName
* @param string $customerData
* @return int
*/
public function addCustomer($tableName, $customerData) {
$rowId = $this->addRecord($tableName, $customerData);
return @$rowId ? $rowId : 0;
}
/**
* Update Customer
* @param array $customerData
* @return int
*/
public function updateCustomer($customerData) {
try {
$this->db->insert('TB_Agency_Customer', $customerData);
return $this->db->lastInsertId('TB_Agency_Customer');
} catch (Exception $e) {
die('There has been an error. ' . $e->getMessage());
}
}
public function getCustomerDetails($AgencySysId, $CustomerSysId) {
$sql = " SELECT * FROM TB_Agency_Customer WHERE AgencySysId = " . $AgencySysId ." AND CustomerSysId = " . $CustomerSysId;
return $this->db->query($sql)->fetchAll();
}
public function getCustomerMembersDetails($AgencySysId, $CustomerSysId) {
$sql = " SELECT * FROM TB_Agency_Customer_Members WHERE AgencySysId = " . $AgencySysId ." AND CustomerSysId = " . $CustomerSysId;
return $this->db->query($sql)->fetchAll();
}
}