• λ我爱Aspx >> C#.Net >> bbs的数据结构和存储过程(二)_ASP实例
  • bbs的数据结构和存储过程(二)_ASP实例

  • :aspxer  Դ:internet  :2007-4-28 23:45:08  ؼ:asp,数据
  • @a_strSubject , @a_strContent , @a_intFaceID , @a_strIP)

    /*判断是否成功*/

    if (@@error != 0) goto OnError

    /*更新版面贴子数*/

    update forum set topiccount = topiccount + 1 where id = @a_intForumID

    if (@@error != 0) goto OnError

    /*更新用户分数*/

    update BBSUser set point = point + 1 where id = @a_intUserID

    if (@@error !=0) goto OnError

    /*执行*/

    commit transaction

    return(0)

    /*错误处理*/

    OnError:

    rollback transaction

    return(-1)

    go

    select id from bbs where fatherid=0 order by rootid desc, ordernum desc

    up_posttopic 1 , 12 , '哈哈哈,见笑了' , 'hello , world' , 1 , 1 , '203.93.95.10'

    /*************************************************************************/

    /* */

    /* procedure : up_GetTopicList */

    /* */

    /* Description: 贴子列表 */

    /* */

    /* Parameters: @a_intForumID : 版面id */

    /* @a_intPageNo: 页号 */

    /* @a_intPageSize: 每页显示数,以根贴为准 */

    /* */

    /* Use table: bbs , forum */

    /* */

    /* Author: bigeagle@163.net */

    /* */

    /* Date: 2000/2/14 */

    /* */

    /* History: */

    /* */

    /*************************************************************************/

    if exists(select * from sysobjects where id = object_id('up_GetTopicList'))

    drop proc up_GetTopicList

    go

    create proc up_GetTopicList

    @a_intForumID int ,

    Ҷƪл˵?
  • һƪbbs的数据结构和存储过程(一)_ASP实例
    һƪbbs的数据结构和存储过程(三)_ASP实例