SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old June 11th, 2003, 02:31 AM
beko beko is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Frankfurt/Germany
Posts: 1 beko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to beko
SQL Stored procedures in PHP

Hi !

I never called stored procedures, located on a MSSQL server before. Now, i have problems, to get the return value from my stored procedure. I will show you the code i use:

$s = @mssql_connect($myServer, $myUser, $myPass) or
die("Couldn't connect to SQL Server on $myServer");

$d = @mssql_select_db($myDB, $s) or
die("Couldn't open database $myDB");

$puserId = 'test';
$pPassword = 'test';


$query = mssql_init("dbo.proc_login_registrar", $s);
mssql_bind($query, "@puserid", $puserId,
SQLVARCHAR ,false,false,15);

mssql_bind($query, "@ppassword", $pPassword,
SQLVARCHAR,false,false,20);

mssql_bind($query, "@pRetVal", $pRetVal, SQLINT2, true);

mssql_execute($query);

//--------------------------------------------------------------------------

My stored procedure returns the userid of the user. If no entry found, it returns a -1 value.

My problem is, that the variable for the return value is not "touched". That means, the return value is not given back.

What i'm doing wrong ???

Thanks,
bernd

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > SQL Stored procedures in PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway