in reply to On Handling Text (Blob) Column Types in MySQL/CGI

You're missing that $sth doesn't contain a number:

$sth->execute($text,$node_id);

Also, there are some situations (such as fields with multiple values) where Vars() will cause you problems. The way you are using it, you are better off writing those two lines as:

my $node_id = $c->param('nodeid'); my $text = $c->param('textdata');

We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re: Re: On Handling Text (Blob) Column Types in MySQL/CGI
by cluka (Sexton) on Apr 03, 2003 at 22:45 UTC
    Sorry about that - my typo. I meant to say
    ... $sth->execute($text,$node_id); ...
    cluka

      The other problem (which I seem to have missed the first time around) is that you are mixing query types, is it an INSERT, or is it an UPDATE? You can't have a WHERE clause for an INSERT (although mysql has a REPLACE INTO syntax which does what you may be trying to do here).


      We're not surrounded, we're in a target-rich environment!