Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: ct_sql Question
Date: Jan 17 2002 7:23PM
Sabherwal, Balvinder (MBS) writes:
> I have a script which executes a stored proc on the server and posts the
> result back on the web page. I have noticed a strange thing in regards to
> the Sequence of the columns in the output on the web page Vs isql. The
> stored proc has a select clause as
> "select a,b,c from t1"
> If I execute this sp from the isql I see the output as it should be i.e. "a
> ,b ,c". When I execute the same proc from the perl script and display the
> output to the web page the columns are in the order of
> "b, c, a".
Right - ct_sql() was never intended to preserve the order of the
columns when using the hashrow functionality.
You may want to adapt ct_sql() to your needs by adding a call to
ct_col_names() and storing that somewhere for later use when printing
the column names.
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
firstname.lastname@example.org - email@example.com
International Sybase User Group - http://www.isug.com