List:MySQL and Perl« Previous MessageNext Message »
From:Jochen Wiedmann Date:January 23 2000 12:37pm
Subject:Re: DBD::mysql: variable binding
View as plain text  
Rob McMillin wrote:

> $insert->execute(1);
> $insert->execute("(yo soy un perdidor)");

In the first "execute" you are passing an integer value.
As the driver has no idea of the column type of "some_column", it
assumes an integer. In other words, no quoting is required.

In the next "execute" you are passing a string. The driver remembers
that you did pass an integer before and doesn't quote again.

A working example is

  $insert->execute("1");
  $insert->execute("(yo soy un perdidor)");

because the driver considers "1" to be a string, thus "some_column"
to be a varchar column.


Bye,

Jochen


-- 
Jochen Wiedmann						joe@stripped
All those frogs she kissed and all she got		+49 711 7168586
was me ...


Thread
DBD::mysql: variable bindingRob McMillin23 Jan
  • Re: DBD::mysql: variable bindingJochen Wiedmann23 Jan