How does the data queried by mysql multiple tables generate model return values like TP? is there such a library?

ask everyone for advice!

return value after multi-table query

< table > < thead > < tr > < th align= "left" > id < / th > < th align= "right" > name < / th > < th align= "center" > age < / th > < th > xingqu < / th > < / tr > < / thead > < tbody > < tr > < td align= "left" > 1 < / td > < td align= "right" > Zhang San < / td > < td align= "center" > 12 < / td > < td > Sing < / td > < / tr > < tr > < td align= "left" > 1 < / td > < td align= "right" > Zhang San < / td > < td align= "center" > 12 < / td > < td > drink < / td > < / tr > < tr > < td align= "left" > 2 < / td > < td align= "right" > Li Si < / td > < td align= "center" > 22 < / td > < td > Sing < / td > < / tr > < / tbody > < / table >

is there a library that automatically returns the queried data to the following data format?


[
[id=>1,name=>"",age=>12,xingqu=>["",""]]
[id=>2,name=>"",age=>12,xingqu=>[""]]
]

is there any similar library file? it"s hard to write this without your own model, not to mention querying 3 tables

.
Php
Apr.27,2021

this highly customized requirement is basically not handled by any class library, and it is very simple and can be done by itself.
you think it's much more convenient to be familiar with sql and php data processing if you don't have to write in the orm framework.
can also write the methods in model.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e281-2c3d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e281-2c3d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?