PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Don Hosek <dhosek at webley dot com>
Subject: Re: returning associative arrays from ct_sql
Date: Jan 21 1999 7:30PM

OK, the secret was that undef in parameter two. 

Now why not just say @rows=$dbh->ct_sql(etc.)
rather than $rows= and then access it as @$rows? The @rows= syntax does
work & is much more intuitive to the reader.

-dh

Michael Peppler wrote:
 
> >>>>> "Don" == Don Hosek  writes:
 
> Don> @rows=ct_sql('select etc.',,1) is apparently not the route to
> Don> take to do the job. Sigh. What do I need to do here?
 
> How about:
 
> $rows = $dbh->ct_sql("select ...", undef, 1);
> foreach (@$rows) {
>    ...
> }

Well, that solved one of the problems, but what I'm wondering is why