red
red

Reputation: 137

MySql Session from 2 tables

I'll make a login session from 2 tables. if username and password match than make a operation join tables. than make a session from all field in join table. anyone know about that query?

I've been try but it not working:

$sql = "SELECT * FROM table1, table2 WHERE username='$username' && password='$password' && table1.FK = table2.PK)";

Upvotes: 0

Views: 204

Answers (1)

andrewsi
andrewsi

Reputation: 10732

Try swapping your &&s to ANDs

If that doesn't work, could you let us know what the output actually is from your query?

Upvotes: 1

Related Questions