# NOTE: Derived from ../blib/lib/Sybase/Sybperl.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package Sybase::Sybperl;

#line 1127 "../blib/lib/Sybase/Sybperl.pm (autosplit into ../blib/lib/auto/Sybase/Sybperl/sql.al)"
sub sql
{
    my($db,$sql,$sep)=@_;			# local copy parameters
    my(@res, @data);

    $sep = '~' unless $sep;			# provide default for sep

    @res = ();					# clear result array

    $db->dbcmd($sql);				# pass sql to server
    $db->dbsqlexec;				# execute sql

    while($db->dbresults != NO_MORE_RESULTS) {	# copy all results
	while (@data = $db->dbnextrow) {
	    push(@res,join($sep,@data));
	}
    }

    @res;					# return the result array
}

# end of Sybase::Sybperl::sql
1;
