declare @service_deadline_date smalldatetime, @community_setting_max_online_count int---defines a variable as a short date format
Select @community_setting_max_online_count =community_setting_max_online_count, @service_deadline_date = Service_deadline_date from Community_info where community_id= @community_id--This is the maximum number of logins
If DateDiff (d, @service_deadline_date, GETDATE ()) >10-In fact, this is to limit the user's usage period, the current date and the record date in the library is greater than 10 days, then return @result = 11
begin
Set @result = 11--Exceeds the usage period
return
End
if (select COUNT (*) from online_user where = @community_setting_max_online_count ">community_id= @community_id)" & Gt;= @community_setting_max_online_count--based on the records in the library compared to the current number
begin
Set @result = 10--Exceeds the online number limit--Returns @result=10
Select @userid =userid, @user_role =user_role, @stamia =stamia, @last_update_stamia_date =last_update_stamia_date,@ level_id=level_id from User_info where Username= @username and password= @password and community_id= @community_id and user _type=0
--Writes some information to the defined three variables from the User information table
if @userid is not null----if @userid invariant null value
Begin-User name and password checksum success
Set @result = 1-Test Success
return
End
Else
begin
set @result =0---login failed
End
SET NOCOUNT off
Go
we take a name for the process above login_verify is called
is written as a place to invoke security authentication in ASP code
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.