Can CI accept a variable as the full join syntax? [SOLVED] |
I created a model which supports a generic database GET request and if you include data from the $joinArray then it will loop through the values of this array and create $builder->join($joinArray);
Unfortunately I can't get this to work. To keep it short I would like to do the following: Code: $joinData = array( In the end, it should behave like this: $builder->join('table AS k', 'k.something = j.anotherthing', 'left'); thank you for your time! Answered, look below for the code if you're having the same issue as me
PHP Code: $joinData = [
Thank you for your response!
The answer provided works like a charm. I was also pointing to a very similar but wrong function which didn't help matters. hah. |
Welcome Guest, Not a member yet? Register Sign In |