Can't write this SQL.

admin

Administrator
Staff member
I want to take specific columns from my login table and JOIN them with specific columns from my test table. So far I cannot construct the proper SQL statement. I keep getting mySQL errors.

$result3 = mysql_query( "SELECT login.firstname, login.lastname FROM login JOIN test.questionone, test.questiontwo, test.questionthree ON test.id = login.id WHERE test.registration = '34568uit'" );

Doesn't work.

$result3 = mysql_query( "SELECT login.firstname, login.lastname FROM login AS C JOIN test.questionone, test.questiontwo, test.questionthree as O ON test.id = login.id WHERE test.registration = 'lovenox01'" );

Doesn't work.

I am constucting this just as my mySQL book says but it will not work.
 
Back
Top