I can't get my SQL code to INSERT a new row into a table See both sets of red for pertenant bits.
my $ed = $DB->table('Editors');
my $details = $DB->table('EditorDetails');
my $number_of_editors; #number of editors in Editors
my $editors_in_details; #number of editors in EditorDetails
my @usernames_e; #list of Usernames from Editors
my @usernames_ed; #list of Usernames from EditorDetails
#Select the Usernames field from 'Editors'
blah blah
#Select the Usernames field from 'EditorDetails'
blah blah
#make a list which contains the difference between both Username lists
blah blah
#if there is a discrepancy between numbers then update EditorDetails
if ($editors_in_details == $number_of_editors) {
print "Number of Editors: Ok<br>";
}
else {
print "<b>Difference between tables:</b> [@userdifference]<br>";
print "<b>Number of Editors:</b> Updating table EditorDetails...";
#update EditorDepth with new usernames
my $editorname=();
foreach $editorname (@userdifference) {
$details->insert ( { Username => $editorname, Email => "Not Shown" });
print "($editorname inserted)";
}
print "Ok<br>";
}
print "<hr>";
http://www.iuni.com/...tware/web/index.html
Links Plugins
my $ed = $DB->table('Editors');
my $details = $DB->table('EditorDetails');
my $number_of_editors; #number of editors in Editors
my $editors_in_details; #number of editors in EditorDetails
my @usernames_e; #list of Usernames from Editors
my @usernames_ed; #list of Usernames from EditorDetails
#Select the Usernames field from 'Editors'
blah blah
#Select the Usernames field from 'EditorDetails'
blah blah
#make a list which contains the difference between both Username lists
blah blah
#if there is a discrepancy between numbers then update EditorDetails
if ($editors_in_details == $number_of_editors) {
print "Number of Editors: Ok<br>";
}
else {
print "<b>Difference between tables:</b> [@userdifference]<br>";
print "<b>Number of Editors:</b> Updating table EditorDetails...";
#update EditorDepth with new usernames
my $editorname=();
foreach $editorname (@userdifference) {
$details->insert ( { Username => $editorname, Email => "Not Shown" });
print "($editorname inserted)";
}
print "Ok<br>";
}
print "<hr>";
http://www.iuni.com/...tware/web/index.html
Links Plugins