Advertisement:

Author Topic: i am getting empty array using the query...  (Read 1131 times)

osclassLover

  • Newbie
  • *
  • Posts: 39
  • thinking to achieve new in osclass
i am getting empty array using the query...
« on: May 12, 2015, 02:49:31 pm »
$this->dao->select("s_name");
            $this->dao->from('oc_t_category_description');
            $this->dao->where( 'fk_i_category_id', $qs['fk_i_category_id']);
            $this->dao->where( 'fk_c_locale_code', $locale );
            $result = $this->dao->get();
            $s =  $result->result();
            print_r($s);
            exit;

i am using this query for getting s_name field for a category id

but i am getting empty array even if i have value in the variable $qs['fk_i_category_id'].

pls help me someone, thanks .

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: i am getting empty array using the query...
« Reply #1 on: May 12, 2015, 06:16:39 pm »
Hi,

In wich file are you including this code? ???

Regards

osclassLover

  • Newbie
  • *
  • Posts: 39
  • thinking to achieve new in osclass
Re: i am getting empty array using the query...
« Reply #2 on: May 12, 2015, 08:54:57 pm »
i am using this code inside oc-includes/osclass/model/Category.php

i am using this code inside a function and the function has a paramater and that parameter is $qs['fk_i_category_id']

but its giving empty result, i dont know why?...

osclassLover

  • Newbie
  • *
  • Posts: 39
  • thinking to achieve new in osclass
Re: i am getting empty array using the query...
« Reply #3 on: May 12, 2015, 10:38:27 pm »
hello  teseo, pls help me , i dont know what to do, i dont know why its not workings...

pls help me out of this problem...

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: i am getting empty array using the query...
« Reply #4 on: May 12, 2015, 10:46:41 pm »
Activate queries.log and look for your custom query, check possible error and see what values are being sent.

http://forums.osclass.org/3-3-x/item-post-location-not-setting/msg117277/#msg117277

Regards