On Tue, 6 Jun 2000, Drew Taylor wrote:

> "Ken Y. Clark" wrote:
> > 
> > On Tue, 6 Jun 2000, Drew Taylor wrote:
> > 
> > > I have a question about data structures. Currently, I am doing SQL
> > > queries and returning an array ref and a hash ref. The array is to
> > > preserve order, and the hash contains various bits of data about that
> > 
> > not to be dense, but can't you just issue an "order by" clause as part of
> > your SQL statement?
> I do that already. But hashes don't preserve order on their own,
> otherwise I'd just use that alone. The array keeps things in the proper
> order, and the hash stores data about each individual record.


doh, but if you fetch the data using ORDER BY and then read in one hashref
at a time you are getting an ordered array, not a hash ...

this is way OT now ...

> 
> -- 
> Drew Taylor
> Vialogix Communications, Inc.
> 501 N. College Street
> Charlotte, NC 28202
> 704 370 0550
> http://www.vialogix.com/
> 


- nick


Reply via email to