Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

In the customers table there's an email column. Write a query that will retrieve all email addresses but will replace th

SELECT REPLACE(email,"@","<at>") AS obfuscated_email FROM customers

4 Answers

Replace " with '.

Its still giving me errors

I don't see where im getting wrong please help

John Aitchison
John Aitchison
5,332 Points

In the REPLACE function, open brackets and insert the first value followed by a comma and a space, then insert the second value enclosed in speech marks followed by a comma and a space, and then for the final value insert the value enclosed in speech marks and end the function in brackets.

Remember to close the SQL with a semicolon.

SELECT REPLACE(email, "@", "<at>") AS obfuscated_email FROM customers;