Voting

: min(six, nine)?
(Example: nine)

The Note You're Voting On

benjaminATwebbutvecklarnaDOTse
17 years ago
Re: anon at anon dot org, about extract() and null values

Personally I've found use extracting multiple resultsets from db where the latter would overwrite the previous when a variable is not null ( and optionally if its not >0 )

It would be useful if $extract_type was extended on top of these two:

EXTR_OVERWRITE
EXTR_SKIP

with something like this:

EXTR_OVERWRITE_NULL
- If there is a collision, overwrite the existing variable if it is null

EXTR_OVERWRITE_0
- Same thing but == 0 or null

EXTR_SKIP_NULL
- If there is a collision, skip the new variable if the existing is not null

EXTR_SKIP_0
- Same thing but == 0 or null

Those ought to cover a few good cases that aren't covered now.

<< Back to user notes page

To Top