CodeIgniter Forums

Full Version: PHPActiveRecord error on empty table ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
I am using codeigniter with phpactiverecord. Everything works fine when saving etc. But when i do a find or count on an empty table I get a :

Fatal error: Class 'ActiveRecord\ActiveRecordException' not found in

I first did this:
Code:
$namecount = $findactor::count(array('source_id' => $source_id));

after that I tried this:

Code:
try {
    $namecount = $findactor::count(array('source_id' => $source_id));
   }
catch (Exception $e) {
   $namecount = 0;
  }

But that gets the same error as mentiond above.