Okey, it's actually this code that generats an error.
PHP Code:
public function color_sql($filter)
{
$this->db->select('*, sum(count) AS color_sum');
$this->db->from('wallpapers_colors');
$this->db->where('saturation BETWEEN ' . (($filter['saturation'][0]) / 100) . ' AND ' . (($filter['saturation'][1]) / 100));
$this->db->where('lightness BETWEEN ' . (($filter['lightness'][0]) / 100) . ' AND ' . (($filter['lightness'][1]) / 100));
$this->db->where('hue BETWEEN ' . ($filter['hue'][0]) . ' AND ' . ($filter['hue'][1]));
$this->db->group_by('wallpaper_seq_id');
return $this->sql();
}
Add:
var_dump($filter);
die();
So that you can see why one color works and not the other.