typomaniac has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cross Table Mysql Update
by typomaniac (Novice) on Jul 02, 2012 at 03:13 UTC | |
by ig (Vicar) on Jul 02, 2012 at 06:22 UTC |