Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在codeigniter中调用MsSQL的上载SP_Php_Codeigniter - Fatal编程技术网

Php 在codeigniter中调用MsSQL的上载SP

Php 在codeigniter中调用MsSQL的上载SP,php,codeigniter,Php,Codeigniter,我需要你帮助我如何调用MsSQL中的存储过程,这是一个上传函数 以下是我在CI中的当前代码: 型号 function search($data){ $qString="[gen048upload]"; $this->db->query('set ansi_padding on set ARITHABORT on set CONCAT_NULL_YIELDS_NULL

我需要你帮助我如何调用MsSQL中的存储过程,这是一个上传函数

以下是我在CI中的当前代码:

型号

function search($data){

    $qString="[gen048upload]";


    $this->db->query('set ansi_padding on
                        set ARITHABORT on
                        set CONCAT_NULL_YIELDS_NULL on
                        set QUOTED_IDENTIFIER on
                        set ANSI_NULLS on
                        set ANSI_WARNINGS on
                        set numeric_roundabort off');
    $query = $this->db->query($qString);    
    return ($query->num_rows() > 0) ? $query->result() : NULL;
}
我当前的控制器仅用于复制到其他目录,但它是:

控制器

    function upgen048()
{

    $this->file_path = realpath(navi_ups.'/gen048');

    $config['upload_path'] = $this->file_path;
    $config['max_size'] = 0;
    $config['allowed_types'] = 'txt';
    $config['overwrite'] = TRUE;

    $this->load->library('upload');
    $this->upload->initialize($config);
    $this->upload->set_allowed_types('*');

    if ( !$this->upload->do_upload('uploadData'))
        {   
                $data['error'] = $this->upload->display_errors();
                $data['main_content'] = 'upgen048';
                $this->load->view('includes/template',$data);
        }
    else { //else, set the success message
                $data = array('msg' => "Upload success!");
                $data['main_content'] = 'upgen048';
                $this->load->view('includes/template',$data);
                $data['upload_data'] = $this->upload->data();

    }
$this->db->query(“调用{storedprocesdure函数名}”)可能重复的
$this->db->query(“调用{storedprocesdure function name}”)可能重复的