#80 (all drivers) Broken behaviour of resultset Fields() method

Old_Version
open
nobody
None
5
2007-02-21
2007-02-21
Daniel
No

In older versions adoDB lite had:

..._Resulset::Fields($field = -1)

or similar, and if no value was specified all the fields were returned.

Now instead there is no implicit value for $field and $field is checked through empty. This is not suggested, as if the field starts with a zero '0' (might be possible in some dbmses using quotes) empty will be evaluated to true.

I suggest the usage of the implicit value $field = null and a check with isset() which would be 100% safe.

Discussion

  • Daniel
    Daniel
    2007-02-21

    Logged In: YES
    user_id=799761
    Originator: YES

    And, furthermore, I cannot retrieve the fields list using the mysqli driver. I have not checked the other drivers.