note 26586 added to function.sybase-query

From: Date: Wed, 06 Nov 2002 00:52:50 +0000
Subject: note 26586 added to function.sybase-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-39013@lists.php.net to get a copy of this message
Did anybody managed to run a query that uses the 'compute' or 'compute by' T-SQL statement? (RH 7.2, PHP 4.0.6, Sybase 11.0.3) I am trying to run this query: <? $query="exec up_ListTickets '".$SDate."','".$EDate."',".$CompanyID; $res = sybase_query($query) or die($query." Query failed"); ?> where up_ListTickets is a stored procedure: PROCEDURE dbo.up_ListTickets;1 (@SDate datetime, @EDate datetime, @CompanyID int) AS BEGIN SELECT * FROM view_ListTickets WHERE CompanyID = @CompanyID AND DateOpened >= @SDate AND DateOpened <= @EDate ORDER BY CompanyName COMPUTE COUNT(CompanyID), SUM(Travel) BY CompanyName COMPUTE COUNT(CompanyID), SUM(Travel) END The error log does not help much: 00:2002/11/05 19:35:40.85 kernel Cannot read, host process disconnected. The sp produces the expected output when called from isql but not in php. Is it because of the extra formatting that compute by returns? -- http://www.php.net/manual/en/function.sybase-query.php http://master.php.net/manage/user-notes.php?action=edit+26586 http://master.php.net/manage/user-notes.php?action=delete+26586 http://master.php.net/manage/user-notes.php?action=reject+26586

« previous php.notes (#39013) next »