jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:
I was recently forced into a server change and it has broken an old script that's in use. I'm getting the error: "Software error: DBD::mysql::st execute failed: Field 'name' doesn't have a default value at admin.cgi line 192."
my $var; if ($new eq "charter") { $var = "c"; } elsif ($new eq "sales") { $va +r = "s"; } my $sth = $dbh->prepare("INSERT INTO $new (active) VALUES (0)"); #line 192 $sth->execute;
Could any kind Monk please advise on the steps I should take to troubleshoot this
NB. The script is connecting to the DB ok - other aspects like edit are working fine
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Software error: DBD::mysql::st execute failed: Field 'name' doesn't have a default value
by hippo (Archbishop) on Oct 28, 2020 at 16:17 UTC | |
by jonnyfolk (Vicar) on Oct 31, 2020 at 07:51 UTC |