So we're assuming the relation between the two tables is members.id ==> info.user_id? You might consider using `member_id` as the column name on both columns, it looks a bit ambiguous. I usually use naming conventions like members.memberID ==> info.memberID_FK to relate the two tables and make it clear the info table stores the Foreign Key.
FROM members AS m
INNER JOIN info AS i
ON ( m.id = i.user_id )
WHERE m.id = 2;
I'd be happy to provide a 'real' JOIN with the CONCAT expression if you'd provide more detail on the columns and what output you expect.
Please post any questions you have as to the JOIN statement itself.
You've got a couple of elements out of place, namely the ON conditional for the JOIN statement needs to immediately follow the JOIN. Then you can use a WHERE clause to establish more matches for the join statement to match columns on.
It needs to be something more like
SELECT `banned` , `password`
INNER JOIN `mrf_uhash` AS `hash`
ON ( `mrf_users`.`password` = MD5( CONCAT('trick',`hash`.`hash`) ) )
WHERE `user_idFK` =3;
I don't quite understand the application logic, but I guess that's ok.
Well the query is used for a login and simultaneous ban check, the final query is something supposed to fetch the hash from the table in accordance with the proper username, the concate it and md5 is and check whether it's the same as the password in the table mrf_users where the username is mrferos