At 16:52 +0000 5/10/02, domi@stripped wrote:
>Well... This seems to be a typical tricky-goute-on-qoute thing...
>I recommend you to test your query in mysql client directly
>(if you havn't already done that).
There really are no tricky quote-on-quote things, except when people
try to mess around quoting data values themselves.
Follow these principles, and you'll never have a problem:
- Use placeholders for data values in the query string, then pass values
to be bound the placeholders when you execute the statement.
- Use $dbh->quote() to quote the values, then insert the result directly
into the query string.
- Never put quotes around the placeholder characters or around a data
value that has been processed by $dbh->quote().
That's it. It works for numbers, text, NULL (undef) binary stuff like
>And THEN take the battle with perls quoting mechanism...
>Another tip is to just print the query before executing
>so You can see exactly how perl is handling with quotes.
>Propably You need to espace quotes to hide them from perl.
>I think this is quote... eh.. I mean quite common way to
>track down this kind of problems but I say it 'just in case'
>You haven't try it yet...
>good luck :-)