List:MySQL and Perl« Previous MessageNext Message »
From:Jochen Wiedmann Date:May 25 1999 8:45pm
Subject:Re: <>
View as plain text  
> Subject: NULL from PERL
> Date: Mon, 24 May 1999 10:36:30 -0500 (CDT)
> From: <redcard@stripped>
> To: msql-mysql-modules@stripped
> Greetings.
> I have an HTML form which passes text to mySQL via PERL, and all of the
> question marks ('?') get converted to 'NULL'.  I've tried having PERL
> format them as '\?' but that doesn't work.  Any ideas how to fix this and
> other pitfalls I can avoid?

The question marks have a special meaning in DBD::mysql: They are used
as placeholders, so that you can do something like

	my $query = "INSERT INTO foo VALUES (?, ?)";
	$dbh->do($query, undef, $id, $value);

(The "undef" is required for other reasons.)

If the driver doesn't detect that your question marks are surrounded by
quotes, that's a bug. But I'd like to see a complete example script then.



Jochen Wiedmann						joe@stripped
Wiedmann'sches Idealgewicht: IQ - 30%			+49 7123 14887

Re: <>Jochen Wiedmann26 May