rfc:mysqli_fetch_column
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:mysqli_fetch_column [2021/03/28 15:41] – Added while loop example dharman | rfc:mysqli_fetch_column [2021/06/11 11:53] (current) – Implemented dharman | ||
---|---|---|---|
Line 5: | Line 5: | ||
* Target version: PHP 8.1 | * Target version: PHP 8.1 | ||
* Implementation: | * Implementation: | ||
- | * Status: | + | * Status: |
Line 51: | Line 51: | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
- | It would be nice to have similar functionality available with %%mysqli_result:: | + | It would be nice to have similar functionality available with %%mysqli_result:: |
- | Of course, it is also possible to execute a %%while%% loop to fetch the column values into an array: | + | Of course, it is very simple |
<PHP> | <PHP> | ||
$result = $mysqli-> | $result = $mysqli-> | ||
$usernames = []; | $usernames = []; | ||
- | while (false !== ($username = $result-> | + | foreach |
- | $usernames[] = $username; | + | |
- | } | + | |
- | // or in one line: | + | |
- | while (false !== ($username = $result->fetch_column()) && | + | |
</ | </ | ||
Line 67: | Line 63: | ||
Simple yes/no vote. | Simple yes/no vote. | ||
+ | Voting started on 2021-04-17 17:00:00Z and ends on 2021-05-01 17:00:00Z | ||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
- | ===== Patches and Tests ===== | ||
- | The implementation is available at https:// | ||
===== Implementation ===== | ===== Implementation ===== | ||
- | After the project is implemented, | + | [[https:// |
- | | + | |
- | - a link to the git commit(s) | + | |
- | - a link to the PHP manual entry for the feature | + | |
- | - a link to the language specification section (if any) | + | |
===== References ===== | ===== References ===== | ||
+ | https:// |
rfc/mysqli_fetch_column.txt · Last modified: 2021/06/11 11:53 by dharman