Php multi-table join query ?? I have two tables, table A: & nbsp; & nbsp; Table B: id & nbsp; ti php multi-table join query ??
I have 2 tables
Table A: Table B:
Id title id content
1 a1 a1 content 1
2 a2 a2 content 2
3 a3 a3 content 3
Now I need to display three content entries in Table B according to the title in Table A, that is, sort and split the content into tables, however, how can I obtain Table B content based on the title in table.
I want to display three Table A titles, but also correspond to the content of Table B. I have never learned about table sharding. please educate me this time.
------ Best solution --------------------
At the end of this post, xuzuning edited select a. id, a. title, B. content from Table A, Table B where a. id = B. id limit 3 at 08:48:42 on January 9 ,.
------ Other solutions --------------------
Select A. id, A. title, B. content from A inner join B B on A. title = B. id
------ Other solutions --------------------
Many examples on the Internet
------ Other solutions --------------------
Left join in
------ Other solutions --------------------
Reply to friends upstairs:
......
Just woke up, let's look at the post and try the moderator and jordan102 methods to get only the things of Table A, maybe I'm useless, please write the short code that is written to the display of the while loop. Let me add my questions. I didn't describe them.
Table:
------ Other solutions --------------------
Table B:
Id title sex
------ Other solutions --------------------
Id content age ......
1 Yi Nan
------ Other solutions --------------------
James students 18 ......
2 James Male