I have a table that stores email in 3 diffrent columns
name host and domain.
I want to join those columns to create one column so i can search by a full email adress.
just like
SELECT * FROM email_eml WHERE (all the columns combined) = $email;
the email is stored without a . and a @ in neither of the columns i would like the final result to contain those.
See the doc (assuming you’re using MySQL) for the CONCAT function: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_concat
However:
*. It’s terrible for performance.$emailvariable is escaped and free of SQL injection risks. If it’s not, use prepared statements.