MSSQL Procedures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeson Hi , this is Nabil from PHP list, i wonder if u could help with the
following:

I have a stored procedure on a remote Microsoft (stupid) SQL server..
and I have to connect to it remotely and I have only permission to execute
those specific procedure , and I only got the returned value...

My server that I will connect from is Linux, apache with MySQL database, and
my code ofcourse PHP....
How can i connect to microsoft SQL server from my php linux server..??? i
think ODBC is not excisted in Linux...
( I reserve to myself to be wrong)...

Please help me if I can , how can I connect to that server , and execute
them, and get the return values...

One of the stored procedures that i got a copy from the remote administrator
is :
Waiting for any comment ....

/////
--==========================================================================
=======
CREATE PROCEDURE ChangePasswd
 @login varchar(32) ,
 @oldpass varchar(16),
 @newpass varchar(16)
AS

declare @chkpass int

set @chkpass = (select count(*) from subaccounts where login=@login and
password=@oldpass)
if @chkpass<>0
 begin
  update subaccounts set password=@newpass where login=@login and
password=@oldpass
  select '0' as err
 end
else
 begin
  select '1' as err
 end

Go
--==========================================================================
=======
////


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux