Table 1 has iduname Table 2 has uid but no uname. you must check table 1. id table 2. uid and output the uname of Table 1, and the general syntax of the result paging is similar to User: hasOneRecord (): pagination (12) doyouknow? Table 1 has an id uname
Table 2 has uid but no uname,
It is required to check table 1.id= table 2.uid and output the uname of Table 1, and paging the results
The general syntax is similar to User: hasOneRecord (): pagination (12)
Do you know?
Reply content:
Table 1 has an id uname
Table 2 has uid but no uname,
It is required to check table 1.id= table 2.uid and output the uname of Table 1, and paging the results
The general syntax is similar to User: hasOneRecord (): pagination (12)
Do you know?
$ Result = DB: table ('Table 1')-> join ('Table 2', 'table 1. ID', '=', 'table 2. uid')-> select ('Table 1. uname')-> paginate (12 );
OR
$ Result = table1: leftJoin ('table2', 'table1. ID', '=', 'table2. uid')-> select ('table1. uname')-> paginate (12 );