Pure ASP Forum Based on Access Database Production Experience

xiaoxiao2021-03-05  21

Date: 2001-3-7 15:28:00 Source: chinaasp.com Author: seal

I feel that a forum is not as easy as imagination, but it is not as complex as imagined :), after 4 days of blood, finally, there is no knowledge of today's forum data structure and organizational situation. OK, the intermediate refers to the idea of ​​Sunamd, BiGeagled, Liao Jiayuan, etc., and gets the enthusiasm of Lai Pei, Hooke, BiGeagle prawns, and thank you for your love. BiGeagle's article adopts the stored procedure of the SQL database to implement, but Reality supports ASP free sites, which supports less site for the database, and supports free sites from the SQL database. . . Anyway, I have never seen it. Which one knows tell me :), so I will wait for the poor only use Access, I just use the ASP Access to achieve a forum similar to ChinaASP. . Gossip less, the words retired. Let's talk about the structure of the database, there are two tables, a storage user information user, a storage forum articles and information mytext. User information is not to say more, mainly the organization of the Mytext Forum article, to achieve the same topic's post organization, follow the pupis, afterwards, and more important, it is necessary to recognize the pupis, otherwise A layer of reply is caused together, and the two layers are rolled together, three layers. . . As follows: Roots Reply 1: Root Post Reply 2: Root Post Reply: Reply 1: Root. . . . So there are several key fields: ID (Auto): Auto number (effect: Show later) ROOTID: Root ID (Role: Realize the same topic) Level (integer): Post number of posts (effect: Reneworthy time) ORDERID: The base of the same topic post sort (role: the same theme post sorted, that is, the case where the above case is prevented) FatherId (integer : Pupire ID, post-blood relationship sorted SQL statement: select * from mytext ORDERBY ROOTID DESC, ORDERID, ID DESC implementation display indent (corrected "without recursive implementation tree structure."): Level = 0 response.write "

    " do while not rs.eof if xi = = rs ("level") to level-1 response.write "" Next End End IF IF RS ("Level"> Level Ten response.write "
      " end if response.write "
    • topic:.

转载请注明原文地址:https://www.9cbs.com/read-32406.html

New Post(0)