Closed flakerimi closed 8 years ago
Maybe. Not sure. You can use these changes on your websites without breaking the core.
You can also integrate any kind of ORM and use it's ->where ->join, etc. No need to reinvent the wheel :)
Yeah sure, I have this on Overrides folder of theme. I just throw this as an idea, so no strings attached.
I have made a small change on DB class which selectAll, selectRow and selectValue can accept mysql JOINS now.
https://github.com/flakerimi/ImpressPages/blob/master/Ip/Db.php#L188 SelectAll, SelectRow, SelectValue now can join Other Tables,
Syntax is
Maybe better connect field would be $table.’_id’ but since it breaks current multilingual solution you have to specify it.
So now you can have User and Profile together.
Or Select Multilanguage categories tables,
You can still use
ipDb()->selectAll(‘categories’, ‘*’)
@jankus @maskas I tried not to break current implementation, but for 5.0 maybe we should do this as chain methods.ipDb()->selectAll($table, $columns)->where( $where = array())->join($joinTable='', joinConnectField='', $joinWhere='')->end($sqlEnd);
what do you think?