Ok, I replaced "undef" with "''"
It now looks like this... I'll show a little more code:
if (defined($in{new_aff}) && $in{new_aff} == 1) { # Checks to see if
# they are adding our Affiliate Program to their registration
if ($in{tax_id} ne "") { # Checks to see if they
# added a tax id number for when we pay them
$dbh->do (qq{ UPDATE reg_users SET tax_id = ? WHERE username =
+ ? },
'', $in{tax_id}, $username);
}
# Ok, these were required fields IF they checked the box which
+ made this
# execute from above
$dbh->do (qq{ UPDATE reg_users SET aff_url = ? WHERE username = ?
+},
'', $in{aff_url}, $username);
# the one above added their Website for us to view
$dbh->do (qq{ UPDATE reg_users SET aff = ?, aff_su_date = ? WHERE
+username = ? },
'', "yes", $formated_date, $username);
# This one adds the affiliate program to the reg_users table.
+it basically just
# turns it 'on'
}
$dbh->do (qq{ UPDATE reg_users SET html_email = ? WHERE username =
+ ? },
'', $in{html_email}, $username);
# this one just above was in a different part of the form, I j
+ust added it.
# It asks them if they support HTML email for our eMail update
+s, they can
# turn it off and on in the "registered users" manager I built
+.
$dbh->disconnect();
# Ok, now this finally disconnects.
It still does not work. It does not update these columns: html_email, tax_id and aff_url
The rest are updated (aff and aff_su_date)
Since those two get updated and the rest do not, I'm very lost. Like I said the $in{var} variables that are being called do have values. I don't know why MySQL is not updating them in the SQL syntax Perl is giving it.
Still lost.
Any other ideas?
Thx,
Richard.
| [reply] [d/l] |
Take a look at the ->trace() method. It allows your script to generate copious amounts of debug information related to DBI. Also, try moving this script to a standalone (as opposed to a CGI) so that you can easily check and troubleshoot.
Also please be aware that I made a mistake in my earlier post. You were indeed correct when using undef in the ->do() statements. Probably it was the time...
Best regards
-lem, but some call me fokat
| [reply] |