I'm developing a site where I need to pull data from multiple table at once.
Earlier I was doing fine, but now when I practiced that code in phpmyadmin, it shows multiple table for just one query
Say for example.
I've two tables on MYISAM engine and when I was trying executing with the code. below
select users.password, userstatus.securityQ, userstatus.securityA from users, userstatus where users.id='$uid'
then it shows multiple rows, and only the last row is relevant to my query while all others are just irrelevant.
Now when I modified the same code with just one additional parameter then it fetching the correct query
select users.password, userstatus.securityQ, userstatus.securityA from users, userstatus where users.id='$uid' and userstatus.uid='$uid'"
Though I've got the flaw here, but I'm no idea why the first code is not working properly. As per my level of knowledge, it should work fine as my userstatus is connected with users table with "uid".
So here uid is unique in both tables.
Please any body help me out here.:shifty::injured: