$count1 = ORM::factory('user')
->where('id', 'IN', $tt1);
if(empty($count1))
{
$count3 = 0;
}else{
$count3 = $count1->count_all();
}
проблема в том, что когда $count1 не пуста то все нормально, а если пуста то выводит ошибку
Database_Exception [ 0 ]: [1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ( SELECT COUNT(*) AS `records_found` FROM `users` WHERE `id` IN () )