Please help me for a few minutes...

I am trying to update a MySQL database RECORD inside of a table.

Here is my code:
if ($in{tax_id} ne "") { #Only update this record IF it has a value! $dbh->do (qq{ UPDATE `reg_users` SET `tax_id` = ? WHERE `username` + = ? }, undef, $in{tax_id}, $username); $dbh->disconnect(); } $dbh->do (qq{ UPDATE `reg_users` SET `aff_url` = ? WHERE `username +` = ? }, undef, $in{aff_url}, $username); $dbh->disconnect(); $dbh->do (qq{ UPDATE `reg_users` SET `aff` = ?, `aff_su_date` = ? +WHERE `username` = ? }, undef, "yes", $formated_date, $username); $dbh->disconnect();

I've tried to combine the last two record updates like this:
$dbh->do (qq{ UPDATE `reg_users` SET `aff_url` = ?, `aff` = ?, `af +f_su_date` = ? WHERE `username` = ? }, undef, $in{aff_url}, "yes", $formated_date, $username) +; $dbh->disconnect();

However, it did not work, so in one of my attempts to make it work, I seperated it. That did not fix it... obviously.

I did have it print the Aff URL like this, into the HTML thank you part:

$thank_you_html = qq~ Aff URL is <b>$in{aff_url}</b /><br /> Tax ID is <b>$in{tax_id}</b /><br /> ~;

As expected that does print what I put in the form. But for some reason, MySQL does not like it.

MySQL WILL However update these columns: `aff_su_date` and `aff`!

Any Ideas why it updates those but not the rest?

I would appreciate your 2 cents on this matter.

thx,
Richard.

In reply to MySQL and Perl... Update record Prob by powerhouse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.