⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

set_relation including where statement



noplan
  • profile picture
  • Member

Posted 18 March 2019 - 22:44 PM

Hi there,

 

yesterday I described in this forum under the "I have a querstion" topic (see /topic/136722-set-relation-with-where-parameter/)  the problem I face when trying to use the set_relation function with the $where parameter. Today I'm not sure if it's already implemented because in Grocery_CRUD.php (v1.6.2) the 4th ($where) and 5th ($order_by) parameters are not used for setting up the select statement (as far as I can see with my limited php knowledge).

protected function get_total_results()
	{
		//...
		if(!empty($this->relation))
			foreach($this->relation as $relation)
				$this->basic_model->join_relation($relation[0],$relation[1],$relation[2]);

		//...

		return $this->basic_model->get_total_results();
	}

Is it correct?

 

Cheers

 

noplan