[eluser]kun kun[/eluser]
i have model that access mssql server 2000 with stored procedure, but i have error like this :
____________________________________________
A Database Error Occurred
Error Number:
The statement has been terminated.
Exec S_REKAP_PEMINATAN_1 2006,4
_____________________________________________
this is the controller
Code:
<?php
class CRekapBeliFormulir extends Controller {
function __construct(){
parent::Controller();
$this->is_logged_in();
}
function index ()
{
$this->load->model('mRekapBeliFormulir');
$data['vRekapBeliFormulir']=$this->mRekapBeliFormulir->get_all();
$this->load->view('vRekapBeliFormulir', $data);
}
function is_logged_in()
{
$is_logged_in = $this->session->userdata('is_logged_in');
if (!isset($is_logged_in) || $is_logged_in != true )
{
$this->load->view('members_false');
}
}
}
this is the model
Code:
<?php
class MRekapBeliFormulir extends Model {
function mRekapBeliFormulir(){
parent::Model();
}
function get_all(){
$data = array();
$kueri = $this->db->query('Exec S_REKAP_PEMINATAN_1 2006,4');
if ($kueri->num_rows() > 0){
foreach ($kueri->result_array() as $row){
$data[] = $row;
}
}
$kueri->free_result();
return $data;
}
}
this is the view
Code:
<?php
echo '<ol>';
if ($vRekapBeliFormulir){
foreach ($vRekapBeliFormulir as $row){
echo $row['NamaProgdis'];
echo $row['JumlahBeliForms'];
echo '<br>';
}
echo '</ol>';
}
else{
echo '<h2>Sorry...:p</h2>';
}
anyone can solve this ? thanks ^_^