[eluser]Unknown[/eluser]
How Do I Use ?
My Procedure Library
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
* @package CodeIgniter
* @subpackage Libraries
* @category Database
* @author Hakan KAYA
* @info Codeigniterda Mysqli Procedureleri Sorunsuz Olarak Kullanmak İçin Yazılmıştır.
*/
class Procedure
{
var $CI;
public $result = NULL; // Dönen Değer Değişkeni
public function __construct()
{
$this->CI = & get_instance();
}
/**
* Mysqli Procedureleri Kullanmak İçin Yazılmış Query Fonksiyonu
*
* @access public
* @param string Sql Cümlesi
* @return string Dönen Değerler
*/
public function query($sql)
{
// Sql Sorgusunu Çalıştır Sonucu resulta At
$this->result = $this->CI->db->query($sql);
// Procedure İçin Yazılmış
while(mysqli_next_result($this->CI->db->conn_id)){
if($l_result = mysqli_store_result($this->CI->db->conn_id)){
mysqli_free_result($l_result);
}
}
// Procedure İçin Yazılmış
// Sonucu Döndür
return $this->result;
}
}
1 - 2 Query And Result No Problem
4 - 5 Query And Result "Commands out of sync; you can't run this command now "
Do not have an exact result? for Use