note 26586 rejected from function.sybase-query by maxim
| From: | maxim@php.net | Date: | Wed, 06 Nov 2002 13:31:23 +0000 |
| Subject: | note 26586 rejected from function.sybase-query by maxim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39038@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?