使用php和sqlite从多个表中的列中选择数据

I am creating a login for multiple tables. I have checked some SO answers like here.

but I can't seem to understand how this works? Below is my php select statement

SELECT export.uname AS exportName, export.pword AS exportPword, 
       import.uname AS importName, import.pword AS importPword, 
       lba.uname AS lbaName, lba.pword AS lbaPword 
WHERE exportName = '$username' AND exportPword = '$password', 
      importName = '$username' AND importPword = '$password';

But I get this error:

Warning: SQLite3::query(): Unable to prepare statement: 17, near ",": syntax error in C:\xampp\htdocs\xport\login.php on line 15

Warning: SQLite3::querySingle(): Unable to prepare statement: 1, ambiguous column name: uname in C:\xampp\htdocs\xport\login.php on line 17 Information incorrect

I don't know where the error is coming from because I don't really understand how to select from multiple tables.

If this was one table I could just type:

SELECT * FROM table WHERE uname = '$username' AND pword = '$password';

All I am asking is how to do this but from multiple tables. Thanks i advance.