i made this query for a function but now i want to use it in another place but INSERT doesn't do what i want, it has to be UPDATE but i just can't get the syntax right.
here's the query:
$sql = "INSERT INTO construir(morada, cod_postal, cod_postal2, localidade) SELECT u.morada, u.cod_postal, u.cod_postal2, u.localidade FROM utilizador u WHERE u.email='$login_utilizador'";
how can i make an UPDATE on certain fields in a table with values from another table?
thanks in advance.