What I want to do, is to echo the data in one column, when I send the data that is in another column, but in the same row.
For example, here is my table:
Table name: customers
firstName | lastName | emailAddress
------------------------------------------------------
John | Doe | [email=johndoe@johndoe.com]johndoe@johndoe.com[/email]
Jane | Doe | [email=janedoe@janedoe.com]janedoe@janedoe.com[/email]
Michael | Smith | [email=michaelsmith@michaelsmith.com]michaelsmith@michaelsmith.com[/email]
Now, when I ask for Jane in column firstName, I want to echo Doe, which is in the column lastName. How can I do this?
P.S.
So far I've got SELECT lastName FROM customers WHERE firstName=lastName, but I can specify which row I want to pull data from.
Thanks in advance!