in reply to Multiple Results Sets with DBI

First of all I'll assume that you are using DBD::Sybase along with FreeTDS. If that's the case, then multiple results are returned like this:
do { while($data = $sth->fetchrow_hashref()) { .... process $data .... } } while($sth->{syb_more_results});
My guess is that you are issuing something like this:
select count(*) from table where ... select ... from table where ...
In that case the first time through the do/while loop you'll get the output from the COUNT(), and the second time you'll get each of the rows from your SELECT.

Michael

Replies are listed 'Best First'.
Re: Re: Multiple Results Sets with DBI
by Anonymous Monk on Aug 21, 2003 at 20:16 UTC
    i am actually calling a stored procedure on the SQL server that returns the count first, then the recordset containing the data
      OK - that actually makes no difference. The result sets that you're going to get are the same, with the addition of the return status from the stored proc, which should be easy to check.

      Michael

        sweet works like a champ thanks. now i just need to figure out how to separate the data.
        works like a champ thanks!, now i just need to figure out how to separate the two resultsets