Gossamer Forum
Home : General : Databases and SQL :

Insert won't Insert!

Quote Reply
Insert won't Insert!
I can't get my SQL code to INSERT a new row into a tableUnsure 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

Last edited by:

sooke: May 18, 2002, 7:03 PM
Subject Author Views Date
Thread Insert won't Insert! Ian 12729 May 18, 2002, 6:54 PM
Thread Re: [sooke] Insert won't Insert!
yogi 12298 May 20, 2002, 6:07 AM
Thread Re: [yogi] Insert won't Insert!
Ian 12316 May 26, 2002, 8:07 AM
Post Re: [Ian] Insert won't Insert!
Paul 12235 May 26, 2002, 10:15 AM
Post Re: [Ian] Insert won't Insert!
Stealth 12233 May 26, 2002, 7:54 PM
Thread Re: [Ian] Insert won't Insert!
yogi 12284 May 27, 2002, 12:11 AM
Thread Re: [yogi] Insert won't Insert!
Paul 12223 May 27, 2002, 1:16 AM
Thread Re: [Paul] Insert won't Insert!
yogi 12343 May 27, 2002, 1:19 AM
Thread Re: [yogi] Insert won't Insert!
Paul 12249 May 27, 2002, 1:21 AM
Post Re: [Paul] Insert won't Insert!
Ian 12230 May 27, 2002, 8:09 AM
Post Re: [Paul] Insert won't Insert!
Ian 12289 May 28, 2002, 1:42 PM