SQL Builder for PHP, with JOIN support?

后端 未结 10 2039
-上瘾入骨i
-上瘾入骨i 2020-12-19 15:29

Are any of you aware of a library that helps you build/manipulate SQL queries, that supports JOIN\'s?

It would give a lot of flexibility i\'d think if you have somet

10条回答
  •  别那么骄傲
    2020-12-19 15:49

    You can use lenkorm it's very easy:

    select('contents)->left('categories ON categories.category.id = contents.category_id)->where('content_id = 1')->result();

    or you can use as:

    select('contents)->left('categories->using(categoru_id)->where('content_id = 1')->result();

    Download it from github

提交回复
热议问题