I have a column that needs to be updated but must be located through a series of events. The column is for passwords. On an update I need to compare an email address in one table with an email address in another which contains a unique id.
my $sth=$dbh->prepare("Update table1 set password='$newpassword' where + binary table1.emailaddress = binary table2.emailaddress and table2. +uniqueid ='$unique_id'"); $sth->execute();
The variables $newpassword and $unique_id are coming through but table1 is not updating. I looked for examples of updates and found none showing where values across tables were compared. Am I doing something wrong or is this something that won't work?
In reply to Cross Table Mysql Update by typomaniac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |