|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-06 08:10 UTC] frank dot neitzel at volkswagen dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 16:00:02 2025 UTC |
Description: ------------ If I have to include a file per "require_once", the mssql-functions will get an own life. -- Life 1 -- #require_once("xxx.php"); $con4 = mssql_connect (....); mssql_select_db (..., $con4); ... -> [Field1] => ... [Field2] => ... -- Life 2 -- require_once("xxx.php"); $con4 = mssql_connect (....); mssql_select_db (..., $con4); ... -> [1] => ... [2] => ... -- so should it be and will work -- mssql_connect (....); mssql_select_db (...); ... -> [1] => ... [Field1] => ... [2] => ... [Field2] => ... Reproduce code: --------------- <pre><? #require_once("xxx.php"); // named db-connection $con4 = mssql_connect ("db-intranet.han.vw.vwg", "xxx", "xxx"); mssql_select_db ("VWN_Redax", $con4); $rst = mssql_query("exec vwn_redax.dbo.sp_get_groups_to_user @u_authuser = 'devwag00\\eneitze'", $con4); $tblUsers = mssql_fetch_array($rst, $con4); print_r($tblUsers); // unnamed db-connection mssql_connect ("db-intranet.han.vw.vwg", "xxx", "xxx"); mssql_select_db ("VWN_Redax"); $rst = mssql_query("exec vwn_redax.dbo.sp_get_groups_to_user @u_authuser = 'devwag00\\eneitze'"); $tblUsers = mssql_fetch_array($rst); print_r($tblUsers); ?></pre> Expected result: ---------------- [0] => 1 [tblRolesId] => 1 [1] => Mitglied [tblRolesTitle] => Mitglied [2] => 3105 [tblGroupsId] => 3105 [3] => 2-C-1 FiSi Admin [tblGroupsTitle] => 2-C-1 FiSi Admin Actual result: -------------- [0] => 1 [1] => Mitglied [2] => 3105 [3] => 2-C-1 FiSi Admin or [tblRolesId] => 1 [tblRolesTitle] => Mitglied [tblGroupsId] => 3105 ... depends on including a file or not.