Hi everybody, I want to join 3 tables and gain same data from these tables. 1.table: usr - user information usr_id 2.table: res- results res_usr_id res_exc_id res_result 3.table: exc- excercises exc_id exc_excercise_name
Now I want print all results from one user and all excercises from one user.Can somebody help me?I don't know how to write this sql query...
Thanks
would you like the users that don't have exercises to also be displayed? If so just replace the word "inner" with "left".
<?php
$query = "select * from
usr
inner join res on usr.usr_id = res.res_usr_id
inner join exc on res.res_exc_id = exc.exc_id";
?>