Home  >  Q&A  >  body text

Regarding the data display problem obtained by fastadmin association model

Table A associates with table B and obtains the data of table B. Now I want to output the multiple names obtained in table B as "1,2,3"

As shown in the figure微信截图_20231007030231.png微信截图_20231007030555.png 微信图片_20231007031018.png

Get multiple "patient_name" of table B through the fields of table A. How should I change the code so that the result output is of the type "1,2,3"

小包子小包子402 days ago652

reply all(3)I'll reply

  • 大瓶可乐@php.cn

    大瓶可乐@php.cn2023-10-07 23:38:35

    Then don’t you join the tables? Directly use the data in table A to look up the data in table B

    reply
    0
  • PHP中文网用户-9810636

    PHP中文网用户-98106362023-10-07 09:44:49

    Test the reply function

    reply
    0
  • 小包子

    Test reply? ? ?

    小包子 · 2023-10-07 15:01:41
  • Cancelreply