in reply to Pushing a 'hash slice' to an AoH

Hi, Maybe I don't understand the reason why you select all columns from your MySQL table. The more easy way to do this to me seems something like:
SELECT col1,col2,col3 from sometable where col5 = col8
and then deref the results into your $events structure.

Replies are listed 'Best First'.
Re^2: Pushing a 'hash slice' to an AoH
by bradcathey (Prior) on Jun 12, 2004 at 14:34 UTC
    Helpful monks,
    You and borisz make get points. However, in my actual production code, I do as much as I can with the WHERE as possible, including lots that I didn't show in my stripped-down example in the OP. However, I am testing for such complex relationships in the rest of the code that I have found it impossible to do it all with the SELECT statement. For the sake of posting on SoPW, I distilled my problem down to the bare essentials, which is why it looks like I wasn't taking full advantage of the SQL language. But thanks for the prompting.

    —Brad
    "A little yeast leavens the whole dough."