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

Hi, can you run this? And post the generated SQL. Can't really see where the category are.
It would also be helpful with a database structure, not the data. But what the tables/columns are named.

PHP Code:
public function get_parent_categories()
    {
        
$views $this->wallpaperViews();
        
$this->db->select('wp.category_seq_id as wpcid,w.*');
        
$this->db->from('wallpapers_path wp');
        
$this->db->join('wallpapers w''w.wallpaper_seq_id = wp.wallpaper_seq_id');
        
$this->db->join("($views) as v"'v.wv_wid = w.wallpaper_seq_id''left');
        
$this->db->group_by('wp.category_seq_id');
        
$this->db->order_by('total_views''desc');
        echo 
$wallpaper_sql $this->sql();

        
$this->db->select('w.*');
        
$this->wallCatTemplate(false);
        
$this->db->join("($wallpaper_sql) as w"'w.wpcid = c.category_seq_id''left');
        
$this->db->where('w.wallpaper_seq_id IS NOT NULL');
        
$this->db->order_by('t2.category_name''asc');
        echo 
$this->sql();
    } 
Reply


Messages In This Thread
RE: Need help related to my codeigniter wallpaper script - by jreklund - 04-07-2018, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB