Dear masters, when I use tp5 to query multiple tables, I use the view query method, similar to Db::view('table_a')->view('table_b')-> view('table_c')->view('table_d')->view('table_e')->select(). If you want to use model classes to do this, it is similar to many What method should be used to perform related queries on tables (more than 5)? Do we need to create an inter-table association model for each table and then string them together for use? Thank you!
DB::table('Table1') ->alias('a') ->field(") ->where( $where) ->join('data table d','a.id=d.id','left')   ;->join('') ->join('') ->order('' ) ->page() -> select(); In this way, no matter how many tables you have, you can join them
Does anyone know the steps and principles of creating and installing a PHP website? Can you please explain? ? ?
PHP website creation and installation procedure steps and principles
Generally speaking, it is rarely used to query the five tables you mentioned. If necessary, it is mostly because there is a problem with your business logic or database design. Don't worry too much about this issue