thjone 发表于 2011-3-16 10:36:35

ci调用sqlserver存储过程

怎么调用啊,带参数那种,手册里没找到,新手问题,大家支持啊

thjone 发表于 2011-3-16 10:45:07

这是一种方法,不过不是用的ci那一套,高手们有没有ci的方法啊
http://apps.hi.baidu.com/share/detail/25190347

thjone 发表于 2011-3-16 14:36:02

谢谢大家,问题已经解决,就是构造一条包含执行存储过程的sql语句串,
$entry_id=$_POST['entry_id'];
          $body=$_POST['body'];
          $author=$_POST['author'];
$sqlStr="declare @ReturnCode int;
      exec @ReturnCode=insert_comments2 ".$entry_id.",'".$body."','.$author.';
      select @ReturnCode rc";
$query = $this->db->query($sqlStr)
就行了

chengjery 发表于 2012-2-24 17:30:30

请问楼主,查询的语句按照这种方式写怎么不行呢?可否给个查询的例子呢?万分感谢!:$:$
页: [1]
查看完整版本: ci调用sqlserver存储过程