In my PHP code, I am calling a stored proc on an MSSQL database (2008 R2). Note: The db admin has set up my db user to use a database by default.So since my db user has the database defaulted for it, do I have to use the mssql_select_db() in PHP? The code runs fine without the call (as far as I know), but I don't know if perhaps it's required for something that I'm just not seeing the effects of right now. Every single example of connecting to MSSQL on the internet shows the mssql_select_db() call -- but I want to know if it's really necessary in my case. The reason I want to remove it is to speed up the process of connecting and executing the sp. My PHP code looks like this:$sqlLink = mssql_pconnect($serverName, $user, $password);if ($sqlLink) { // needed? mssql_select_db($p21DbName, $sqlLink); $stored_proc = mssql_init("[dbo].[stored_proc_name_here]", $sqlLink); mssql_bind($stored_proc, "@customerID", $cust_num, SQLINT4); mssql_bind($stored_proc, "@SKU", $SKU, SQLVARCHAR, false, false, 15); mssql_bind($stored_proc, "@qty", strval($quantity), SQLINT4); $proc_result = mssql_execute($stored_proc);} ....
Thank you!Jenna