Trying to 'call' stored procedures with CodeIgniter

后端 未结 2 1645
滥情空心
滥情空心 2020-12-18 13:49

i\'ve this working code with CI:

$this->db->query(\"call nameOfProcedure(\'param1\', @param2)\");
$query = $this->db->query(\'SELECT @param2 as r         


        
2条回答
  •  隐瞒了意图╮
    2020-12-18 14:07

    Check out the docs on call_function. It's for calling functions that aren't native to CI's DB driver, not for calling procedures you've written.

    You can check the call_function code in /system/database/DB_driver.php Ln 998 on CI 2.1.0 to see clearly what it's doing.

提交回复
热议问题