Brad
Well-Known Member
So I'm trying to grab items from a table WHERE the items ID = 202, but where the user_ids RANK is < 4 . but the Items table doesn't define the rank so you'd have to grab that from the other table (users). I'm using INNER JOIN which I've never done before and it's confusing the hell out of me.
Here's my current code.
This isn't grabbing anything so I don't know what needs fixing. Thanks
Here's my current code.
PHP:
$result = mysql_query("SELECT i.base_item, i.user_id FROM items WHERE i.base_item ='202' AS i
INNER JOIN users AS u
ON i.user_id= u.id WHERE u.rank < 4");
$num_rows = mysql_num_rows($result);