Commit graph

402 commits

Author SHA1 Message Date
Calvin Buckley
ae6a2efed7
Link to the drivers, since it's not obvious what it's meant
Closes GH-1552.
2022-04-28 15:03:54 +02:00
Calvin Buckley
1d06977916
All drivers implement getColumnMeta
Since php/php-src@caa710037e, all bundled
drivers (Firebird and ODBC being the omissions before) implement this
function. The third-party drivers, even the ones in massive states of
disrepair, support it too. It's still optional, so a new PDO driver
could take us by surprise, but the list is misleading, so just include
the warning.

Closes GH-1548.
2022-04-27 11:03:16 +02:00
George Peter Banyard
e84773a605
Add missing parameter sections for PDO methods (#1459) 2022-04-02 15:34:36 +01:00
colshrapnel
e1cbbb434a
Fix the return value description
The comment in the source code [goes](04a4864b65/ext/pdo/pdo_stmt.c (L1152)) as "if there are no more rows" and doesn't mention any failure.

Closes GH-1480.
2022-03-25 11:23:54 +01:00
Jordi Boggiano
ddce0c4643
Add default value to setFetchMode's $constructorArgs with FETCH_CLASS
Closes GH-1436.
2022-03-02 10:48:19 +01:00
Karmel0x
3562cc154f
PDOStatement::bindParam maxLength is confusing (#1371) 2022-02-02 17:51:14 +00:00
Christoph M. Becker
831c458502
Fix GH-1314: getAvailableDrivers shows as pdo_drivers and not clickable 2022-01-08 23:47:50 +01:00
Máté Kocsis
7733a3cea8
Update and reorder PDOException::$code
According to gen_stub.php
2022-01-03 14:18:00 +01:00
Christoph M. Becker
670525ef4c
Remove return values section from PDO::__construct() 2021-12-29 23:45:24 +01:00
Máté Kocsis
0773339dce
Generate various method synopses from stubs - part 5 (#1234) 2021-12-22 14:18:28 +01:00
othercorey
6f058bba94
Adjust fetchAll() purpose to match return description
Closes GH-1212.
2021-12-17 14:06:41 +01:00
hakre
65d4ecb42e
PDOStatement colons for names in array example (#1094)
passing values for _named parameters_ in an array allows array keys to be
either the names of the named parameters or (alternatively) the names
prefixed with colons (<colon> : <U003A> COLON) mimicking the placeholders
in the SQL query.

therefore the examples should show first verbatim names as array keys and
then highlight the alternative syntax with colon suffix for the array keys
with a dedicated comment within the examples' code.

same applies to function parameters that represent the parameter name,
e.g. with `PDOStatement::bindParam()` or `PDOStatement::bindValue()` which
is the same as compared with the original `PDOStatement::execute()`.

additionally removed superfluous curly brackets in the first examples'
`$colour` string interpolation of `PDOStatement::execute()`.
2021-12-15 21:08:19 +00:00
Julien Fastré
770b67f36a
Mention question mark escape feature
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-1056.
2021-12-15 21:00:52 +01:00
Máté Kocsis
642411772c
Generate ext/pdo class synopses from stubs
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-1109.
2021-12-15 19:52:36 +01:00
Christoph M. Becker
af64507ffd
Fix #71916: Two attribute constants use the same value 2021-11-16 15:02:05 +01:00
Sergey Panteleev
126161cc61
Fix changelog entry
For correct display on
https://www.php.net/manual/en/doc.changelog.php
2021-11-03 14:49:28 +03:00
Danack
b95e76e41d
Types are not hints in PHP. (#1003)
As they are checked at run-time, type checking is enforced in PHP and not 'hinted'.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2021-10-09 14:43:01 +01:00
Sergey Panteleev
8a2141dcc0
Deprecated functions and constants
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-981.
2021-10-04 16:53:40 +02:00
Christoph M. Becker
c807f27964
Fix #81189: PDOStatement::fetchAll() claims "false on failure" return 2021-09-20 12:15:17 +02:00
Kamil Tekiela
25a4efd32a
Reword PDOStatement::nextRowset example description
Closes GH-940.
2021-09-13 15:48:46 +02:00
Kamil Tekiela
c7c883ab47
Fix type in PDO::setAttribute (#867) 2021-08-20 16:23:44 +01:00
Kamil Tekiela
44262a5c76
colno to column 2021-08-06 22:56:11 +01:00
Kamil Tekiela
c88610d43a
Fix fetchAll synopsis (#842) 2021-08-06 22:39:45 +01:00
Kamil Tekiela
f6e0117681 Add missing <classname> 2021-07-25 00:40:09 +02:00
Christoph M. Becker
053f0940f7
Minor improvements to PDO::query()
As suggested by @salathe; see GH-813.
2021-07-24 00:58:56 +02:00
Kamil Tekiela
02e6f35734
Add missing parameter to pdo query (#813) 2021-07-23 22:26:44 +01:00
Kamil Tekiela
c29dbc6680
Add missing word "and executed" 2021-07-23 19:07:45 +01:00
Kamil Tekiela
4a3d3cf1f6
Fix inaccurate information in pdo query (#806)
* Added the missing 'prepares' to the description

* Removed inaccurate information. The statement is returned even if there's no result set

* Added a note explaining what to do if the SQL has placeholders

* Removed confusing para. It's not a feature of PDO::query

* Simplify the return part

* It returns a statement, not a result set!
2021-07-21 16:18:54 +01:00
George Peter Banyard
3d69f8f11f
Fix most missing param sections for PDO
Also rearange changelog before examples for one file

Part of #658
2021-06-13 19:24:31 +01:00
Máté Kocsis
2097828a3d
Document that PDO::FETCH_DEFAULT is only available as of PHP 8.0.7
Closes GH-597.
2021-06-01 14:54:46 +02:00
Kamil Tekiela
91bec719b3
Fix #81073: bad example titles for PDOStatement::execute
Closes GH-621.
2021-05-22 23:17:22 +02:00
Christoph M. Becker
1fe877df2e
Fix #81066: Documentation conflicts about default PDO error mode 2021-05-21 18:14:23 +02:00
Máté Kocsis
c9c158137b
Generate ext/pdo methodsynopses based on stubs (#494) 2021-05-06 14:50:35 +02:00
Yoshinari Takaoka
1200e4ec5a Added PHP 8 into versions.xml for pdo based on stubs. 2021-05-04 18:54:58 +01:00
Kamil Tekiela
84e8f0960b
Removed redundant if and use short array syntax (#571) 2021-05-03 12:35:23 +02:00
Sergey Panteleev
8a058e9acd
Removed references to PHP 5, 7.0 (#549)
PDO and PCRE sections
2021-04-27 12:53:38 +03:00
Sergey Panteleev
a0ae28d3bc
Removed references to PHP 5, PHP 7.0 (#545) 2021-04-24 20:01:17 +03:00
Sergey Panteleev
aab33d6443
Removed references to PHP 5, PHP 7.0 (#544) 2021-04-23 11:35:26 +03:00
Dharman
a3a310ccc2 Remove try-catch from PDO examples
Also fix erroneous indentation.

Co-authored-by: Anna Filina <afilina@gmail.com>

Closes GH-323.
2021-03-08 17:03:42 +01:00
Christoph M. Becker
6dfe076725 xi:include INI settings documented elsewhere in ini.list
We do not xi:include core INI settings, since we want to keep
alphabetic sort order (well, roughly at least).

We do add xi:fallback elements to all xi:includes, just in case.
2021-02-24 17:58:20 +01:00
Christoph M. Becker
0eaef37f83 Fix #80789: Return type includes false 2021-02-23 13:38:47 +01:00
Christoph Michael Becker
e41806c30b Revert revision(s) 351724 from phpdoc/en/trunk:
Document false and null return types

Cf. <https://news-web.php.net/php.doc.cvs/17645>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351730 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 18:05:44 +00:00
Christoph Michael Becker
4754397753 Revert revision 351727 from phpdoc/en/trunk:
Document false and null return types

Cf. <https://news-web.php.net/php.doc.cvs/17645>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351729 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 17:58:32 +00:00
Jakub Vrana
69bd53265b Document false and null return types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351727 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 15:12:46 +00:00
Jakub Vrana
c80da7c04a Document false and null return types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351724 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 12:54:59 +00:00
Christoph Michael Becker
310515f826 PDOStatement::fetchObject() returns object|false
Patch contributed by Benjamin Morel <benjamin.morel@gmail.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351575 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-24 13:36:39 +00:00
Christoph Michael Becker
86e6094e86 Use canonical type names
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351133 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-02 15:39:04 +00:00
Christoph Michael Becker
03cc650911 Removed misleading example from rowCount()
The example given was confusing and misleading. If the purpose of it is
to show how to get the count of matching records from the database then
the example can be much shorter. `query()` should not be checked with
`if` statement and there should not be 2 separate queries to the
database if the actual count is not needed. If the number of fetched
records is needed then you can simply use PHP's `count()` function.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351083 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-30 13:13:47 +00:00
Christoph Michael Becker
ef5d3c54ff Fix #78111: Some PDO drivers don't have any version information
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350723 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-30 21:33:14 +00:00
Christoph Michael Becker
a7bdc593b7 Remove PDO_4D documentation
The extension had its latest release (0.3 beta) in 2009, and is obviously
unmaintained.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350722 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-30 21:17:30 +00:00