Thread: Join
View Single Post
Old 02-17-2008, 06:32 PM   #6 (permalink)
SOCK
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

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
Code:
SELECT `banned` , `password`
FROM `mrf_users`
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.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote