Hi all,

I am trying to modularize some standard MySQL queries that I frequently
do against our RADIUS DB.

The current setup feels very 'kludgy' to me. The code snip below comes
out of the module. I hope there is enough context to see why I think it
can be improved.

Essentially, I'd like a graceful way for the module to perform the
query, and then as neatly as possible pass back the result in a manner
that would require the minimal amount of processing when it's returned
back to the initial application. In almost all cases, there will be
multiple rows returned:

--- snip ---

        $query->execute;

        my @current_row;
        my @total_rows;

        while (@current_row = $query->fetchrow_array()) {
                push (@total_rows, [EMAIL PROTECTED]);
                @current_row = ();
        }

        return (@total_rows);

--- end snip ---

Regards,

Steve

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to