⚠ 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

Error when printing or exporting



Charly

Charly
  • profile picture
  • Member

Posted 15 January 2018 - 12:26 PM

Hey guys. I would really appreciate your input on this error I'm having. I have 3 where statements for my table.

$crud->where('itemStatus != ','Destroyed');
$crud->where('destroyDate>=',$datefrom);
$crud->where('destroyDate<=',$dateto);

They work perfectly when viewing the table but if I want to print or export the table I get this error:


An uncaught Exception was encountered

Type: Error

Message: Call to a member function result() on boolean

Filename: G:\wamp64\www\application\models\Grocery_crud_model.php

Line Number: 87

Backtrace:

File: G:\wamp64\www\application\libraries\Grocery_CRUD.php
Line: 1346
Function: get_list

File: G:\wamp64\www\application\libraries\Grocery_CRUD.php
Line: 1645
Function: get_list

File: G:\wamp64\www\application\libraries\Grocery_CRUD.php
Line: 4694
Function: exportToExcel

File: G:\wamp64\www\application\controllers\Myigniter.php
Line: 270
Function: render

File: G:\wamp64\www\index.php
Line: 315
Function: require_once

I'm really puzzled here. If I comment out the last 2 where statements then it exports perfectly. I've tried playing around with it but nothing seems to make a difference. Thanks in advance.


Charly

Charly
  • profile picture
  • Member

Posted 15 January 2018 - 18:46 PM

I've finally managed to fix the issue. I had to fix my routing.