如何在laravel Query构建器中进行此查询

时间:2017-06-22 08:15:32

标签: laravel laravel-query-builder

SELECT
                        p.*, (IF(dp.Rate, dp.Rate, p.Rate)) AS Rate
                    FROM
                        visp.packages p LEFT JOIN (SELECT
                                        *
                                    From
                                        visp.dealer_packages
                                    Where
                                        DealerID = 56 OR DealerID = 0
                                   ) dp on dp.PackageID = p.packageID
                    WHERE p.Status = 1 AND (IsPublic = 1 AND dp.Status is NULL OR dp.Status = 1) AND IsDealerCanAdd = 1 ORDER BY
                    p.PackageOrdering

如何在laravel-querybuilder中进行此查询?

0 个答案:

没有答案