CodeIgniter Forums

Full Version: Bug or not.... A Database Error Occurred no error number only sql query??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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

function get_last_ten_entries()
$query = $this->db->get('test');
return $query->result();

$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
But could not get it working.
I am using mssqlserver 2000

Many thanks

Raymond Marx