I want to write a function looking into a query :
SELECT Customers.afid, orders1.customerid
FROM Customers INNER JOIN orders1 ON Customers.Customerid = orders1.customerid;
With the following condition :
If customers.afid = 3 , to update the order1.cusomerid to 124
Like that :
UPDATE Customers...