How do I replace other tables in php?

subject
I now have a problem
data table structure:



2158 / 
2159 / 

16620 / 2158
16620 / 2159

blog_id / tags
16620 / null

I am now writing that the tags field of C datasheet is empty
I want to associate C"s blog_id associated B Datasheet-> to A Datasheet through php, fetch the value back to C Datasheet and UPDATE tags is like this: Dumpling, Noodle


blog_id / tags
16620 / ,

how can this be realized? Can you give me some ideas?

Jul.15,2021

b table and a table join will get the data, and then insert c table on it? So what's your difficulty?


it is assumed that the id of table An is associated with the bid of table B:

select GROUP_CONCAT(A.tag SEPARATOR ',') as tags,B.id from A join B where A.id = B.bid
Menu