Welcome Guest, Not a member yet? Register   Sign In
problem with active records class

i m using the following code to fetch data from database but it isn't showing any results, can anyone plz point out what is wrong with my code.

$tables='product, category, sub_category';
$q=$this->db->get_where($tables, $conditions);
    return $q->results();

I have used the same statement in phpmyadmin and it shows result. Am i doing anything wrong here??

I used this code in phpmyadmin
SELECT * FROM product, category, sub_category where product.category_id=category.id and product.sub_category_id=sub_category.id

thank you

also if i would like to use it with ci paginatio then which code should i use?
is it okay if i use get_where($tables, $condition, $config['per_page'], $this->segment(3));

Theme © iAndrew 2016 - Forum software by © MyBB