On 28 January 2011 16:19, Simon Slavin <[email protected]> wrote:
> I strongly suspect that your value for $q{BUTTON} is wrong. Can you add a
> diagnostic like to display it ?
Yes, I realised immediately after posting that I had duplicated the
substitution in the stand-alone script so obviously the 'if' returned
false.
$q{BUTTON} = "Delete c10";
##############$q{BUTTON} =~ s~^Delete[^\d]+~~i;
if ($q{BUTTON} =~ s~^Delete[^\d]+~~i){
my $rows = $dbh->do("DELETE FROM contacts WHERE rowid =$q{BUTTON}");
print $rows;
}
Once I 'd deleted the second line it did work in the standalone
script. But the duplication is not in the cgi version. Nevertheless
now I am assured that it does work, I've just got to find what silly
mistake I've made in the main script. I already have a diagnostic
display giving the correct integer.
JD
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users