List:MySQL and Perl« Previous MessageNext Message »
From:Jochen Wiedmann Date:September 17 1999 7:37am
Subject:Re: Question marks and Blobs...
View as plain text  
"Stephen P. Paschall" wrote:
> 
> Anyone know why question marks contained in strings I'm storing to varchars
> and blobs sometimes (often, but not consistently) get transformed into
> 'NULL'? I.E., I call
> 
> "UPDATE 1999candidates_electdb SET descrip = \"$cand_info[5]\""

That's not using question marks, isn't it?

First of all, you should *never* use the above code for inserting blobs.
What if the blob contains double quotes? (It almost certainly will!)
Either use $dbh->quote() or the question marks.

With $dbh->quote and the question marks, there's a single possibility
of getting NULL inserted: You are passing a value of undef. Thus I am
99% sure you are doing something wrong. I cannot guess what, without
looking at the code, though.


Sorry,

Jochen


-- 
Jochen Wiedmann						joe@stripped
Life has brown and green eyes. :-)			+49 7123 14887


Thread
Question marks and Blobs...Stephen P. Paschall17 Sep
  • Re: Question marks and Blobs...Jochen Wiedmann17 Sep