i'm trying to write a MySQL query for update a table, but i obtain an error. This is my query:
UPDATE mytable
SET mytable.email = (
select ps_customer.id_customer
from ps_customer
where ps_customer.email = mytable.email)
where (ps_customer.email = mytable.email)
Mysql says: #1054 - Unknown column 'ps_customer.email' in 'where clause'
I can't understand where error is. Can you help me, please?
Best Regards, Simone