in reply to question mark?
When $sth is executed, any values passed to "execute" replace the question marks in the preprared SQL statement in the order the question marks appear. In this case: "select * from sometable where id="12345" is what gets executed. There's lots of good docs on this in the DBI documentation.my $sth = $dbh-> prepare ("select * from sometable where id=?"); $sth->execute("12345");
Anyway, that's what your problem is. If you don't want the questions marks to be interpreted incorrectly, use this:
...which should happily quote out all the bad stuff for you (question marks aren't the only characters that'll screw you up) and keep the NULLS from getting inserted.$command = $dbh->quote($command);
Gary Blackburn
Trained Killer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: question mark?
by Monolith-0 (Beadle) on Apr 29, 2001 at 06:07 UTC | |
by Trimbach (Curate) on Apr 29, 2001 at 08:25 UTC |