• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Builder query question From table AS table01, table AS table02

#3
(04-12-2020, 01:21 PM)maxxd Wrote: Just code the where clause directly, like so:

Code:
$builder->where('node.LFT BETWEEN parent.LFT AND parent.RGT');

There's no variable interpolation or substitution so it should be fine.

Thanks

Also problems solved with the table selection
PHP Code:
$this->db db_connect($this->dbActiveGroup);

$builder $this->db->table("$this->dbTable AS da_node,  $this->dbTable AS da_parent");
$builder->resetQuery();

$builder->select("da_parent.*");
$builder->where("da_node.LFT BETWEEN da_parent.LFT AND da_parent.RGT");
$builder->where("da_node.NAME "$node);

$builder->orderBy("da_parent.LFT");

$query =  $builder->get();
$this->dbLastQuery =  $this->db->getLastQuery();
return 
$query
Reply


Messages In This Thread
RE: Builder query question From table AS table01, table AS table02 - by Bart Goossens - 04-12-2020, 02:52 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.