[thelist] MySQL antics

Adrian adrian at logo-logic.com
Wed Sep 5 06:41:38 CDT 2001


Hi Gang,
Thanks for the tips the other day on joins and unions.  I still havent come
to terms with it but Im closer.

Todays problem is easier.  The sub below is supposed to count the number of
emails my system sends.  It is called from within the sendemail sub.  Having
said that, it doesnt work.
<snip>
###THIS SUB COUNTS THE NUMBER OF EMAILS WE SEND
sub email_count {
my $db = &dbconnect;
dbh=$db->do("UPDATE tblEmailCount SET
totalEmails=totalEmails+1,monthlyEmails=monthlyEmails+1 ");
my &dbdisconnect($db);
}
</snip>
It throws this error:
Can't modify constant item in scalar assignment at dockets.pl line 610, near
");"

But if I feed it staring into phpMyAdmin it works fine.

Ive added and deleted bits and pieces but I cant get it to work from within
my main script.  Puzzling (to me anyway)

Any Ideas would be appreciated.

Adrian Fischer





More information about the thelist mailing list