| 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/modules/event/models/ |
Upload File : |
<?php
/* Zend Framework
* @category Zend
* @package Zend_Controller_Action
* @copyright Copyright (c) 2008-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version 1.0
* @author Ranvir singh <ranvir@catpl.co.in>
* Create Date 06-09-2016
* Update Date 06-09-2016
* ************************************************************* */
class Event_Model_Event extends Zend_Db_Table_Abstract {
function __construct() {
$this->db = Zend_Db_Table::getDefaultAdapter();
}
public function __destruct() {
$this->db->closeConnection();
}
public function insertTable($table, $data) {
$dbtable = new Zend_Db_Table("$table");
return $dbtable->insert($data);
}
public function updateTable($table, $editData, $where) {
$dbtable = new Zend_Db_Table("$table");
return $dbtable->update($editData, $where);
}
public function GetAllEventIndustry() {
$select = $this->db->select();
$select->from(array('tbl' => "Tb_Master_Event_Industry"));
$select->where('tbl.IsActive = ?', 1);
$select->where('tbl.IsMarkForDelete = ?', 0);
$result = $this->db->fetchAll($select);
return $result;
}
public function GetAllEventCategory($IndustrySysId = null) {
$select = $this->db->select();
$select->from(array('tbl' => "Tb_Master_Event_Category"));
$select->where('tbl.IsActive = ?', 1);
$select->where('tbl.IsMarkForDelete = ?', 0);
if ($IndustrySysId) {
$select->where('tbl.IndustrySysId = ?', $IndustrySysId);
}
$result = $this->db->fetchAll($select);
return $result;
}
public function getAllEvent($AgencySysId) {
$select = $this->db->select();
$select->from(array('tbl' => "TB_Event_Master"));
$select->where('tbl.AgencySysId = ?', $AgencySysId);
$select->where('tbl.IsActive = ?', 1);
$select->where('tbl.IsMarkForDelete = ?', 0);
$result = $this->db->fetchAll($select);
return $result;
}
}