0
How to run multi query at same time from different table in MYSQLI prepare php
I have two table.. Match,User In match> There is two column Mid,type (In this table there is 4 match , user can register in any match from these matches, and all data of user is goes to User table with mid ) In User> There is two column Mid,name Now i want to show all result from table(match) and also on every result shows from match, i want to show how much user registered in this match Mid(match table) from table(user)... (With Mysqli prepare )
1 Respuesta
+ 2
You need to use a join in sql.
https://www.w3schools.com/sql/sql_join.asp
SELECT m.mid, m.type, u.name
FROM match m
LEFT JOIN user u ON m.mid=u.mid