rayne5446
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by rayne5446
-
-
Hi all,
Between PDO, MDB2, ADOB, PEAR DB, and the mssql command, I'm having trouble choosing the library that is right for me.
I'm going to be using alot of stored procedures with MSSQL, and while I'm not sure if I will need multiple result set functionality, it would be nice if it was supported.
From what I've seen, PDO_DBLIB doesn't support multiple result sets. I've also seen that the driver is listed as experimental on alot of sites.
Perhaps, someone can help guide me in the right direction.
Thanks
PDO Stored Procedure Return Values
in Microsoft SQL - MSSQL
Posted
Hey Guys,
I'm working with a SQL Server stored procedure that returns error codes; here is a very simple snippet of the SP.
DECLARE @ret int
BEGIN
SET @ret = 1
RETURN @ret
END
I can't figure out how to access the return value in PDO; I'd prefer not to use an OUT parameter, as alot of these Stored Procedures have already been written. Here is an example of how I am currently calling the procedure in PHP.
$stmt = $this->db->prepare("EXECUTE usp_myproc ?, ?");
$stmt->bindParam(1, 'mystr', PDO::PARAM_STR);
$stmt->bindParam(2, 'mystr2', PDO::PARAM_STR);
$rs = $stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);