Re: Re: Calling MSSQL Stored Procedure

From: Date: Fri, 16 Sep 2005 08:29:48 +0000
Subject: Re: Re: Calling MSSQL Stored Procedure
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-26335@lists.php.net to get a copy of this message
Mark Rees wrote:
I have to access a MsSQL stored procedure coded as follows :- CREATE PROCEDURE spGetActivePromotions @Today datetime AS SELECT PromotionID, PromotionName, StartDate, EndDate, LastDrawDate,
      MaxDraws, NumRegTickets, VouchersPermitted, NumTicketsPerVoucher,
ManualTicketIssue FROM Promotion WHERE @Today>=StartDate AND @Today<=EndDate GO and therefore have coded my php as follows :- $PMdriver = "mssql"; $PMdb = ADONewConnection($PMdriver); $PMdb->Connect($PMserver, $PMuser, $PMpassword, $PMdatabase); $SQL = $PMdb->Prepare("spGetActivePromotions"); $ActualDate = strftime("%Y/%m/%d %I:%m:%S %p");
what does echo $ActualDate give you? I get 2005/09/16 10:09:22 AM which is exactly the same format as it appears in the database table when viewed via Enterprise Manager.
-- Regards, Alf Stockton www.stockton.co.za Today is what happened to yesterday. My email disclaimer is available at www.stockton.co.za/disclaimer.html

« previous php.windows (#26335) next »