note 26565 rejected from function.mssql-query by betz

From: Date: Tue, 05 Nov 2002 10:36:19 +0000
Subject: note 26565 rejected from function.mssql-query by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38986@lists.php.net to get a copy of this message
Hi! I have a stored procedure on the mssql server: CREATE Procedure dbo.spwGetMachineLossByWeek @PL varchar(1), @Line varchar(1), @Week int, @HUF int, @FIM int As select b.machine, Sum(Cast(b.lost * p.price as decimal(15,2))) euro, Sum(Cast(b.lost * p.price* @HUF as decimal(15,2))) huf, Sum(Cast(b.lost * p.price* @FIM as decimal(15,2))) fim from baandata b, pec06.baan_data.baan_admin.price p where Datepart( wk ,Cast((cast(ho as varchar)+'/'+cast(nap as varchar)+'/'+cast(ev as varchar)) as datetime)) = @Week and b.component = p.component and SUBSTRING(b.machine,2,1) = @PL and SUBSTRING(b.machine,3,1) = @Line group by b.machine GO And the php code whic is usig this procedure: $sql = "exec spwGetMachineLossByWeek '1','1','43','241','6' "; $que = mssql_query($sql); while ($row = mssql_fetch_array($que)){ echo "$row[0] $row[1] $row[2]"; } But it is not working... Can somebody help to me? z

« previous php.notes (#38986) next »