sql - How to merge two tables in a mysql query -
first of sorry know mysql not recommended more in case have no control , have use it.
now onto question.
i have 2 tables games
, videos
inside games have
| id | gameid | gametitle | | 1 | 1 | halo odst | | 2 | 2 | disgaea 4 |
inside videos have
| id | game | videotitle | image | | 1 | 1 | title 1 | path | | 2 | 1 | title 2 | path | | 3 | 2 | title 3 | path | | 4 | 1 | title 4 | path |
i need following
select x,y,z video videos.game = games.gameid
which read
select id, videotitle, image videos video.game = 1
(or other numeric value)
i’m aware have use join nothing have tried appears working , yeah i’m getting this.
the closest below query says works returning empty result set wrong somewhere.
select * `games` inner join `videos` on `game` `game` = 1
if i'm using phpmyadmins sql query tool rather actual code @ stage want working before coding it.
any appreciated.
thanks.
select * `games` g inner join `videos` v on v.game = g.gameid g.gameid = 1
Comments
Post a Comment