|
Posted by Gazchurchend on 06/23/06 09:17
Hi
I have been trying to use stored procedures in PHP as shown in the
example below. But all the ones I have tried return strange values.
This simple function simply returns a user id given their logon
details. It should return 89 but returns 24772797. I have tried
different SQL type references shown i.e. SQLINT1 etc. but all do the
same....
I am stuck, HELP PLEASE.... Are there other ways I should be trying. I
am using PHP 5 on IIS6 with SQL SERVER 2000.
-------------------------------------------------------------------------------------------------------------
$link_id = mssql_connect("any","sa","something");
mssql_select_db("dev", $link_id);
$proc = mssql_init("spGetWhoAmILoggedInAs", $link_id);
$login = "LGROUP\J_BLOGGS";
mssql_bind($proc, "@NTAccountLogin", $login, SQLCHAR);
mssql_bind($proc, "@StaffID", &$staffid, SQLINT2, TRUE);
$result = mssql_execute ($proc);
echo "STAFFID - ".$staffid."<br>";
--------------------------------------------------------------------------------------------------------------
Thank you in advance.....
Navigation:
[Reply to this message]
|