How to implement tp5 template returns the name to which the request ID belongs according to the ID request function

how does tp5 implement the template that returns the name to which the request ID belongs according to the ID request function

< H2 > [Product Table]: product < / H2 >

id | name
1 | PC website
2 | Mobile website
3 | Mini Program

< hr > < H2 > [customer Table]: client < / H2 >

id | name | prodect_id
1 | customer A | ["1", "2", "3"]
2 | customer B | ["1", "2"]
3 | customer C | [1 "," 3 "]

< hr >

when rendering data in the "customer template" list, how to get the name value corresponding to ID in the "prodect_id" table according to the ID in "prodect". If there is a delay in returning the data from ajax, you want to call the function method directly through the template to get it. If there are other better methods, please let me know

.
Php
Mar.17,2021

you directly write the method to get the corresponding name in common.php, and then in the template {: the name of the method you wrote (id)}

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-1b3dd7e-34790.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-1b3dd7e-34790.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?