ID: 39161 Updated by: [EMAIL PROTECTED] Reported By: aspen dot olmsted at alliance dot biz Status: Assigned Bug Type: PDO related Operating System: windows xp sp 2 PHP Version: 5CVS-2006-10-15 (snap) Assigned To: wez New Comment:
That's correct. This is currently the expected behavior. Previous Comments: ------------------------------------------------------------------------ [2006-10-15 15:35:42] aspen dot olmsted at alliance dot biz Description: ------------ If I call a SQL 2000 stored procedure through pdo odbc in a prepared statement it will not set the proper field order if the order does not match the parameter order in the SP. Reproduce code: --------------- 2000 SQL SP (can be empty): create procedure pdo_test2 @Param1 int, @Param2 varchar(100) as PHP Code: $a["param1"] = '26050'; $a["param2"] = 'test'; $sql = "exec pdo_test2 @param2 = :param2,@param1 = :param1"; $stmt = $dbh->prepare($sql); $x = $stmt->execute($a); Expected result: ---------------- The column order should not matter if the names are passed Actual result: -------------- If I trace in sql I see the following: exec sp_prepare @P1 output, N'@Param1 int,@Param2 varchar(100)', N'exec pdo_test2 @param2 = @Param1,@param1 = @Param2', 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39161&edit=1