Hey guys,
I'm struggling with MySQL. I pretty much only have the basics of it understood, and a little flimsily at that, but I'm still trying to do more and hopefully jumpstart my knowledge.
I have a games table with bits of data - id, game tile, image etc, but only one thing for each so I've never really had any hassles with it. Now though I'm trying to add reviews to it, which will not be limited, so I'm trying to use a second table for it. This has a unique id, gameid which matches the first tables id, and the review.
$id=mysql_result($result,0,"id");
$gametitle=stripslashes(mysql_result($result,0,"title"));
I've always used this to get the data I want, but when I use a join in my query, instead this stops working. Obviously I have it wrong.
$query="SELECT * FROM games JOIN reviews ON games.id=reviews.gameid WHERE id='$id'";
This is my query line, which would normally just be select * from games WHERE id='$id'
I want to setup the page to automatically list the information, and give one of the reviews, chosen at random. Can anyone tell me what I should be doing differently?