in reply to Populating an array from a mysql select

Erm, yes because fetchrow_array fetches one row. You call it successive times until it returns an empty list (at which point the paranoid will check $select->errstr to see if anything went wrong).

Update: Perhaps selectcol_arrayref and a suitable SELECT statement would be a better fit for what you're attempting? At any rate, read the DBI docs.

Replies are listed 'Best First'.
Re^2: Populating an array from a mysql select
by blazar (Canon) on May 05, 2007 at 17:28 UTC

    Sorry for replying to you rather than to the OP, but he seems not to read at all what I write nor to care about it, while claiming he does: see the previous link for more info.

    So, from now on, I'm not replying him directly, but to the first reply to his posts: basically, this user

    • has the habit of posting the very same questions here and in clpmisc, often copying and pasting the very same text from one place to the other one and without indicating in any way doing so;
    • posts articles with so many spelling errors to be in any case a pita and in certain circumstances even hardly readable at all. All this, because in his own words, "he types too fast". (Of course in his world rereading them to be gentle to the people who will read what he writes, is not contemplated.)

    In this case:


    Nik, if by any chance you're reading this... please stop friggin' doing that!


    Update: I have to acknowledge that lately the person I'm talking about seems to have eventually understood.