At 2003-02-11 09:06:19 (+1100), Preston de Guise wrote in 2,1KByte:
> At the moment I've got a system whereby a user inputs some data which is
> collated into a record that also includes several values that are
> auto-created by other components of a system.
> [...] Unfortunately if some of the content
> includes character combinations that can be interpreted to be placeholders,
> which is where the select then becomes unstuck, because it's not really
> trying to do a placeholder style select...
I'd try to use placeholders for the content in first place. :-)
I.e. instead of concatenating the content into the query/ies,
(dynamically, if neccessary) build a query with placeholders,
wherein the content goes. This will also protect you against
unclean input --- no more "xxx ; select * from passwd; ".
> I could if I really had to completely change the system so that it works
> out the auto-created values first and then does the insert but that's a lot
> of work, so before I decide that I absolutely have to do this I'm hoping
> that someone will answer with a simple variable in the DBI module that I've
> over-looked that turns off placeholders (if that's possible).
If you are not using placeholders, do you use
$dbh->quote($string);
to protect these '?' & co?
-Wolfgang