Doc #70118 [Csd]: PDOStatement::execute manual says "values are treated as PDO::PARAM_STR"

From: Date: Sat, 19 Dec 2015 18:00:08 +0000
Subject: Doc #70118 [Csd]: PDOStatement::execute manual says "values are treated as PDO::PARAM_STR"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12996@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70118&edit=1

 ID:                 70118
 Updated by:         tpunt@php.net
 Reported by:        chealer at gmail dot com
 Summary:            PDOStatement::execute manual says "values are
                     treated as PDO::PARAM_STR"
 Status:             Closed
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        Irrelevant
 Assigned To:        tpunt
 Block user comment: N
 Private report:     N

 New Comment:

PDO::PARAM_STR does not *represent* an integer. It is *represented by* an integer, but it itself
represents "the SQL CHAR, VARCHAR, or other string data type"[1]. Given the
aforementioned, and that the default binding type is PDO::PARAM_STR, I still don't see the
sentence as being incorrect. If anything, I'd say it is more technically accurate than
mentioning "string", since we're not actually talking about strings in PHP, but
rather strings at the database level (like PDO::PARAM_NULL representing the SQL NULL data type,
rather than PHP's null).

[1]: http://uk1.php.net/manual/en/pdo.constants.php


Previous Comments:
------------------------------------------------------------------------
[2015-12-19 16:43:00] chealer at gmail dot com

tpunt, why was this closed?

Note that this is not about ambiguity, nor just about clarity. The sentence is simply wrong.
PDO::PARAM_STR represents an integer which I do not know, so the current form would translate to
something like "All values are treated as 1234.", which is at best the opposite of what
the sentence should claim.

------------------------------------------------------------------------
[2015-12-18 21:05:51] tpunt@php.net

Given that it's in the context of parameter binding, I think the current description is quite
unambiguous. Whilst it could be changed to read "as strings (PDO::PARAM_STR)", I
personally don't feel it adds any extra clarity to the sentence.

------------------------------------------------------------------------
[2015-07-23 14:53:06] chealer at gmail dot com

Description:
------------
 input_parameters

    An array of values with as many elements as there are bound parameters in the SQL statement
being executed. All values are treated as PDO::PARAM_STR. 
---
From manual page: http://www.php.net/pdostatement.execute
---

PDO::PARAM_STR indicates string parameters. "as PDO::PARAM_STR" could read "as
strings (PDO::PARAM_STR)", or simply "as strings".



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70118&edit=1


Thread (12 messages)

« previous php.doc.bugs (#12996) next »