You are here: Strange values returned from Stored Procedure « PHP Programming Language « IT news, forums, messages
Strange values returned from Stored Procedure

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация