Welcome Guest, Not a member yet? Register   Sign In
How can i make model query based on images
#1

(This post was last modified: 08-18-2015, 10:27 PM by freddy.)

Hi thanks for some respon in past now i have been working on my cms and need help

my problem is here tell by images  here http://prntscr.com/85zesi


if in php native i can do that by save each id in every function but in model codeigniter i'm still figure it out !

and here is my model


Code:
//detail trend

function detailtrend($art_slug)     //consider art_slud is the max id from table    
    {
        return $this->db->query("SELECT * FROM `articles` WHERE art_slug='$art_slug'");
    }

//sisa trend
function lefttrend($art_slug)        
    {
        return $this->db->query("SELECT * FROM `articles` WHERE art_slug != '$art_slug' and art_jenis='TREND' limit 1");
    }

//how can i write funtion as your said above

I don't know how to get data in the images, if any some suggest feel free to comment here, thanks
Reply


Messages In This Thread
How can i make model query based on images - by freddy - 08-18-2015, 10:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB