⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Fatal error message.



Jack Uw
  • profile picture
  • Member

Posted 24 October 2013 - 11:08 AM

HI guys!

 

Can´t seem to execute in my db. Why?

 

Fatal error: Call to a member function execute() on a non-object in C:\test\system\database\drivers\pdo\pdo_driver.php on line 193

 

My controller:
class View extends CI_Controller {

    public function try()
    {
        $this->load->database();
        $this->load->helper('url');
        $this->load->library('grocery_CRUD');
        $this->grocery_crud->set_table('log');
        $output = $this->grocery_crud->render();
        echo $output;  
    }
    
}

 

 

My database config:

$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'sqlite:flog.sqlite';
$db['default']['username'] = '';
$db['default']['password'] = '';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'pdo';
$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';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

 

The database is a sqllite db. And there is a table named "log". There is no other connection issues since i am able to write to it in another controller. The DB is located in the root of my codeigniter directory (where index.php is)

 

[EDIT]

Just found out why from this page:
http://www.grocerycrud.com/documentation/known-issues

Only works with MYSQL and MYSQLi database.

 

Well, that sux :-) Guess i would have to manage without Grocery CRUD.

[/EDIT]


edramirez
  • profile picture
  • Member

Posted 10 November 2013 - 14:32 PM

Sometimes it might make better sense to use MySQL and take advantage of grocerycrud's power.

 

Regards,

 

Ed

 

P.S. If you agree, just hit the like button.