简体   繁体   English

Laravel 5.7中的mysqli multi_query

[英]mysqli multi_query in laravel 5.7

I want to make a query of two or more different tables to the database with Laravel 我想使用Laravel向数据库查询两个或更多个不同的表

"SELECT * FROM table1";
"SELECT * FROM table2";

Is there any way to do this in Laravel? Laravel有什么办法做到这一点?

something similar to this mysqli::multi_query 类似于此mysqli :: multi_query的东西

There is no solution like this in laravel. laravel中没有这样的解决方案。 but alternatively, you can use Laravel Eloquent Relations. 但您也可以使用Laravel雄辩关系。

https://laravel.com/docs/5.0/eloquent#relationships https://laravel.com/docs/5.0/eloquent#relationships

This may help you. 这可能对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM