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

(This post was last modified: 01-12-2018, 12:01 PM by jreklund.)

Try this one

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 ' . (float)(($filter['saturation'][0]) / 100) . ' AND ' . (float)(($filter['saturation'][1]) / 100), NULLFALSE);
   
$this->db->where('lightness BETWEEN ' . (float)(($filter['lightness'][0]) / 100) . ' AND ' . (float)(($filter['lightness'][1]) / 100), NULLFALSE);
   
$this->db->where('hue BETWEEN ' .(float)($filter['hue'][0]) . ' AND ' . (float)($filter['hue'][1]), NULLFALSE);
   
$this->db->group_by('wallpaper_seq_id');
   return 
$this->sql();

Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB