• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database error, but no error number or message

I'm getting an empty result return on the model code below and a page title that just says "Database error"... no actual mysql error number or message is given anywhere:

$this->db->select('COUNT(*) AS comment_count');
$this->db->where('comments.comment_created >= NOW() - INTERVAL '.$options['time_number'].' '.$options['time_unit']);
$this->db->order_by('comment_count', 'DESC');

Any ideas?

P.S. - Yes, the query works and it runs fine the long way with $this->db->query() (but I need the above structure to work).

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.