Use php to combine 3 mysql tables -
is possible combine following 3 mysql tables using php?
- table 1: columns - userid, username, userpass
- table 2: columns - accountid, accounttype
- table 3: columns - userid, accountid, date, rating
please note new mysql , php
to fetch, example, result-set of usernames account types , ratings you'd use:
select table1.username, table2.accounttype, table3.rating table1 join table3 on table3.userid = table1.userid join table2 on table2.accountid = table3.accountid;
in future, recommend listing tables descriptive names, , in order joined acheive result-set need.
hope helps
Comments
Post a Comment