note 26565 added to function.mssql-query
| From: | zoltana dot kovacs at elcoteq dot com | Date: | Tue, 05 Nov 2002 09:40:05 +0000 |
| Subject: | note 26565 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38984@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
--
http://www.php.net/manual/en/function.mssql-query.php
http://master.php.net/manage/user-notes.php?action=edit+26565
http://master.php.net/manage/user-notes.php?action=delete+26565
http://master.php.net/manage/user-notes.php?action=reject+26565