Welcome Guest, Not a member yet? Register   Sign In
Need help related to my codeigniter wallpaper script
#9

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.
Reply


Messages In This Thread
RE: Need help related to my codeigniter wallpaper script - by jreklund - 01-12-2018, 12:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB