Daneman wrote:
At 10:06 24-2-03 -0500, Keith C. Ivey wrote:
On 24 Feb 2003, at 13:42, Daneman wrote:
> I use a perl script & DBI to insert records into a mySQL database. > This database holds 1 text-column. Now when this text-field holds any > question marks, they appear in the record as`NULL`.
Post the Perl code you're using for the insert query. It sounds like you're doing something wrong with placeholders.
I got an email from Matthew Smith who adviced me to do:
$sql=qq{ INSERT INTO MyTable (MyFields) VALUES (?, ?, etc) }; $sth=$dbh->prepare($sql); $sth->execute( $val1 ,$val2, etc);
instead of what I did originally:
INSERT INTO MyTable (MyFields) VALUES ($val1, $val2, etc);
Question marks are no longer replaced with NULL values in the text column this way, still, when I enter question marks into the charvar fields, the record is not taken into he database. I'm not sure whether this is a mySQL or a Perl problem at this stage.
Any ideas?
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php