sethwalsh has asked for the wisdom of the Perl Monks concerning the following question:
All the other variables are working fine and if I change $key1 to say "firefox.exe" it works, but for some reason it just doesn't want to update using the keys. I've tried putting all the keys into normal arrays and it still won't update due to the WHERE part of the query. The query itself runs but $showfail equals 0 and the my debug file simply says "UPDATE FAILED" with no explanation. I've also tried other loops like for, nested foreach, etc and still no go. Thank you for your time. Sethforeach $key1(keys(%prog_numbers)) { $update = $ldb->prepare("UPDATE LOW_PRIORITY $ldbtable SET $mtime=$pro +g_numbers{$key1} WHERE software=\"$key1\""); $showfail = $update->execute; $update->finish();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DB update query from Linux using a Hash array
by pc88mxer (Vicar) on Mar 24, 2008 at 23:48 UTC | |
|
Re: DB update query from Linux using a Hash array
by jfraire (Beadle) on Mar 25, 2008 at 00:56 UTC | |
by sethwalsh (Initiate) on Mar 25, 2008 at 16:04 UTC | |
|
Re: DB update query from Linux using a Hash array
by igelkott (Priest) on Mar 25, 2008 at 20:18 UTC | |
|
Re: DB update query from Linux using a Hash array
by sethwalsh (Initiate) on Mar 26, 2008 at 22:50 UTC |