Dottext Database Analysis (2)

Source: Internet
Author: User
(2) blog_config table-related stored procedures
Blog_config stores the registered user information, and adds a new blog through the Stored Procedure blog_utility_addblog. The Code is as follows: Create proc blog_utility_addblog
(
@ Username nvarchar (50 ),
@ Password nvarchar (50 ),
@ Email nvarchar (50 ),
@ Host nvarchar (50 ),
@ Application nvarchar (50 ),
@ Author nvarchar (50 ),
@ Title nvarchar (100 ),
@ Subtitle nvarchar (250 ),
@ Ishashed bit,
@ Skin nvarchar (50) = 'anothereon001 ',
@ City nvarchar (50)
)

As

Declare @ flag int
Set @ flag = 55
If (@ ishashed = 1)
Set @ flag = 63

Insert blog_config (lastupdated, username, password, email, title, subtitle, skin, skincssfile, application, host, author, timezone, language, itemcount, flag, registertime)
Values (getdate (), @ username, @ password, @ email, @ title, @ subtitle, @ skin, null, @ application, @ host, @ author, 8, 'zh-CHS ', 10, @ flag, getdate ())

Exec blog_insertblogprofile @ identity, @ City


Go

It is worth noting that the password parameter for passing in the stored procedure has been encrypted.
See blog_insertblogprofilecreate proc blog_insertblogprofile.
(
@ Blogid int,
@ City nvarchar (150)
)

As

Insert blog_profile (blogid, city)
Values (@ blogid, @ City)






Go

Add the city information of the blog in the blog_profile table.
First, let's look at the structure of the blog_profile table.

In general, the City field should be placed in the blog_config table. Why is it placed out of the table? Wait for further research.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.