I am using sqlite3 have a database name "test.db" that contains two tables, login and manager
login table attributes
_id|username|password|manager_id
manager table attributes
manager_id|name|role
manager_id is a foreign key of login table. I inserted some values into the table
login
1|gmJohn|abc|1
2|gmJane|def|2
manager
1|john|GM
2|jane|Staff
I am trying to query the name,role of a manager against it's username and password
for example username:gmJohn,password:abc = name:john,role:GM
I tried this query
select name,role from login,manager where username="gmJohn" and password="abc";
But it's returns me this result.
john|GM
jane|Staff
expected results
john|GM