Re: PDO::PARAM_DOUBLE

From: Date: Wed, 07 Dec 2016 22:13:53 +0000
Subject: Re: PDO::PARAM_DOUBLE
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-97330@lists.php.net to get a copy of this message
Hi, On 07/12/2016 22:39, Adam Baratz wrote: > If you want to bind a double to a statement, the accepted approach is to > bind as a string: > > http://stackoverflow.com/questions/2718628/pdoparam-for-type-decimal For decimal, double wouldn't be the correct type anyway, as it could cause loss of precision. > Is there a reason PDO::PARAM_DOUBLE doesn't exist? I don't know if there's am historical reason. I think it should be there, but to be honest, I'm not sure it's worth the effort at this point. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/

« previous php.internals (#97330) next »