Foreign key select failed

edited July 2014 in Modules
public $foreign_keys=array('location_id'=>array(FUEL_FOLDER=>'store_locations_model', 'where'=>'level>0'));

was trying to find all store locations with level >0 , but the above query failed. I also looked into CI active record examples such as
$this->db->where('name !=', $name);
$this->db->where('id <', $id);

but dont think it is same syntax

Comments

  • edited 12:10AM
    When you say the query failed do you mean there was an error or it didn't return the correct results? If there was an error, what was it?
  • edited 12:10AM
    Query failed. I think it turns out to be have where `level>0` saying no such column of level>0
  • edited July 2014
    try using the array syntax of array('level >' => 0) or put spaces around the " > "
Sign In or Register to comment.