< /p>
As shown in the figure, a User has multiple topics, and each topic has a corresponding theme.
Please tell me how to implement this relationship using php+mysql?
人生最曼妙的风景,竟是内心的淡定与从容!
Do you mean the actual table structure, or how to query this data form
I don’t know if you wrote it in a framework or natively
// 查詢USER表 $returndata = array(); while($userdata = mysql_fetch_assoc()) { $id = $userdata['id']; //跟著根據id查詢topics $topicssql = ""; ..... $userdata['topics'] = array(); while($topicsd = mysql_fetch_assoc()) { $userdata['topics'][] = $topicsd; } }
This is usually done by merging the retrieved data in the background
Do you mean the actual table structure, or how to query this data form
I don’t know if you wrote it in a framework or natively
This is usually done by merging the retrieved data in the background