Welcome Guest, Not a member yet? Register   Sign In
Bug or not.... A Database Error Occurred no error number only sql query??
#1

[eluser]Unknown[/eluser]
A Database Error Occurred
Error Number:

SELECT * FROM "test"
--------------------------------------------

Hello I am very new to codeigniter.
I wanted to test it with mssql database.

Above is the error I get.
Is this a bug or where should I search for solving the error.
Any tips..

-->I changed autoload.php
$autoload['libraries'] = array('database');
-->This is my database.php
$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "R5";
$db['default']['password'] = "rayrayrayr5";
$db['default']['database'] = "R5_php_dev";
$db['default']['dbdriver'] = "mssql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

--> the code
model
...

function get_last_ten_entries()
{
$query = $this->db->get('test');
return $query->result();
}
...
controller
...
$this->load->model('Blog_model');

$data['query'] = $this->Blog_model->get_last_ten_entries();

$this->load->view('blogview', $date);
...

I found on google only something that it was a bug..
Probably I just make a beginners mistake.
But I can not figure this out.....

Ah just tried the sollution
http://ellislab.com/forums/viewthread/71558/#353513
But could not get it working.
I am using mssqlserver 2000


Many thanks

Raymond Marx
RayIT




Theme © iAndrew 2016 - Forum software by © MyBB