Dreamweaver
A friend asked how in the DW to achieve the content page of the reading count, this aspect of the online tutorials a lot of people ask more, I simply combined the "Deep Space Whole Station" program code, and then write the operation process.
Before the operation to do a detailed content page of the system, by browsing the site page you can see in the article List page link to give a fid_articlecontent=xxx parameter to link to the details page ndex_article_content.asp. A specific look at the relevant information, I will not nonsense. Action steps are as follows:
1, open the Index_article_content.asp page in the DW, add content in the page related, for example "read the number of times:". After that, insert the related record field fhits. The following figure:
2, in the "Application" in the "Server Behavior" panel click the "+" button, select "Command", the following actions:
3, in the pop-up "command" window, the name fill in "Commarticlecontenthits" (can be customized), the connection selection conndb (depending on the specific database connection name), type select "Update", in the SQL box input:
3, in the pop-up "command" window, the name fill in "Commarticlecontenthits" (can be customized), the connection selection conndb (depending on the specific database connection name), type select "Update", in the SQL box input:
UPDATE tarticlecontent
SET fhits = fhits + 1
WHERE fid_articlecontent = Mm_articlecontentid
After "variable" click on "+", add a variable, the name is "Mm_articlecontentid" (and the last one in the SQL statement), run value fill in: Request.QueryString ("Fid_articlecontent")
Description: In ASP, the value of the URL parameter is obtained by the statement request.querystring ("parameter name").
The following figure:
This is the page that adds a 1 command per visit to the Fhits, and the click Count function is achieved.
The example appears as follows:
UPDATE tarticlecontent
SET fhits = fhits + 1
WHERE fid_articlecontent = Mm_articlecontentid
After "variable" click on "+", add a variable, the name is "Mm_articlecontentid" (and the last one in the SQL statement), run value fill in: Request.QueryString ("Fid_articlecontent")
Description: In ASP, the value of the URL parameter is obtained by the statement request.querystring ("parameter name").
The following figure:
This is the page that adds a 1 command per visit to the Fhits, and the click Count function is achieved.
The example appears as follows:
The point is, every time we visit the page to see the last count, such as the database in the initial count of 0, you first open it directly show 0. This method also applies to the counting of message boards, forums, downloads, and so on.