Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97328 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16942 invoked from network); 7 Dec 2016 21:39:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2016 21:39:49 -0000 Authentication-Results: pb1.pair.com header.from=adam.baratz@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam.baratz@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.223.180 mail-io0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:34372] helo=mail-io0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/DF-11772-4A188485 for ; Wed, 07 Dec 2016 16:39:49 -0500 Received: by mail-io0-f180.google.com with SMTP id c21so677854155ioj.1 for ; Wed, 07 Dec 2016 13:39:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=YYkW2Ls7CkRVFwdRQjDCdtg1znCmTWtDLjGcA2GpmDA=; b=ns4ZELHaOViVFwgN3AGuI+kdW9ySSuIx8J8+qwfZpWZZpzUl31zQUqFnPN8P6knFm/ mR1bKjPH1pwN4We/PFz9Qwi4Uhg+io4jxsfuk4LeUgkoixfdc8YwmCJ8CaMjtVmdfu1I GvDanNt0HfqqW+iGcelBJqAR347gQsTUeLxJeTRm4yZ0O/Y1OoXJfaK6EEg2O+6NkK8e kksNIDVtyFLNlcbcKtNZe5esPZUA6/utp51QXa8W1FYGAx0WGTHIVwU3IdVb6ciqOifB v9VbT0CVydUEO2l/FPB2ABv9xT+2rHNtKEzievhhtXD6mqDOcHDMO2+VSElUV4GBaIqm i+BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=YYkW2Ls7CkRVFwdRQjDCdtg1znCmTWtDLjGcA2GpmDA=; b=Wc680rRQ4yzvKOotxFP6lOnJ5BdCDxU/XU6aEAfDfPjpYWBjCSbMnc/MqqALCXNd9+ bRSpUy6WW3uxmmUkl5o3oxtkg3WAoAzoGhMyp+OX42R66g/F+5fr9TvqtZN3q+wg7vBW dA1Z8d/WSrFCTJN0H824JuWs87sshOV/vnB8xZvrrS8trTXvsN8v2kRSETyWiNCxcA0V +1UiWNpq3Yr30Gb+1iQw5uu8IlTXhCYFpkZGuO/j6zF4oyrWpU5P3vKRFDwrz7k9sVsJ SdGkVOgYTX+9sh9PnARAo5OSryoTPIRXMnoLFfyVo+xfzRfaE3hSIMGP9s5o1rokS0VB aLMg== X-Gm-Message-State: AKaTC00iqOHMqxQBNFKWRka8H4Qkr7STqriaSdBdVm+cOQErElfbe823VZXr5UQyJ+ZkL6ZRg8MMNF862hY2fA== X-Received: by 10.107.180.212 with SMTP id d203mr60356586iof.101.1481146784359; Wed, 07 Dec 2016 13:39:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.146.10 with HTTP; Wed, 7 Dec 2016 13:39:44 -0800 (PST) Date: Wed, 7 Dec 2016 16:39:44 -0500 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c05e3a8f12ba50543185b76 Subject: PDO::PARAM_DOUBLE From: adam.baratz@gmail.com (Adam Baratz) --94eb2c05e3a8f12ba50543185b76 Content-Type: text/plain; charset=UTF-8 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 However, this means that prepared statements see these values as strings. This can cause issues, for example: http://stackoverflow.com/questions/38105900/sqlite-having-comparison-error pdo_mysql will actually watch for doubles, but this code will never be reached since all doubles are cast to strings: https://github.com/php/php-src/blob/3f25c4228a8f505a000c1ea5751062606247349a/ext/pdo_mysql/mysql_statement.c#L563 Is there a reason PDO::PARAM_DOUBLE doesn't exist? Thanks, Adam --94eb2c05e3a8f12ba50543185b76--