|
Server : LiteSpeed System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : outerorb ( 1091) PHP Version : 8.1.34 Disable Function : mail Directory : /home2/outerorb/crm.outerorbittech.com/application/controllers/ | |
|
Path: /home2/outerorb/crm.outerorbittech.com/application/controllers/Qsql.php
Size: 780 B
Permissions: 0664
<?php
class Qsql extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function execute(){
$data['title']="Execute";
$this->template->load('pages','query',$data);
}
public function goquery(){
$query=$this->input->post('query');
$str=explode(";",$query);
$count=count($str);
for($i=0;$i<$count-1;$i++){
if(!empty($str[$i])){
$run[]=$this->db->query($str[$i]);
}
}
$ok=count($run);
$x=0;
for($i=0;$i<$ok;$i++){
if(empty($run)){
++$x;
}
}
if($run){
$this->session->set_flashdata('msg',"Query Executed Successfully");
}
else{
$this->ession->set_flashdata('err_msg',"Error Please Try Again $x Not Executed");
}
redirect($_SERVER['HTTP_REFERER']);
}
}
?>