Stored Procedure Properties
| Name | Value |
|---|---|
| Owner | dbo |
| Created | 2004-05-31 |
| Startup | False |
| Encrypted | False |
Creation Options
| Name | Value |
|---|---|
| QUOTED_IDENTIFIER | OFF |
| ANSI_NULLS | OFF |
Parameters
| Name | DataType | Length | Type |
|---|---|---|---|
| @UserName | nvarchar | 100 | INPUT |
| @Password | nvarchar | 40 | INPUT |
Total: 2 parameter(s)
SQL
SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO create procedure forums_CheckUserCredentials ( @UserName nvarchar(50), @Password nvarchar(20) ) AS IF EXISTS(SELECT UserName FROM Users WHERE UserName = @UserName AND Password = @Password AND Approved=1) BEGIN -- update the time the user last logged in UPDATE Users SET LastLogin = getdate() WHERE UserName = @UserName SELECT 1 END ELSE SELECT 0 GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO