Log in

Please declare the exact username and password!

Forgot password?

Đăng Ký

Bạn phải điền đầy đủ thông tin đăng ký!

  

    [Share] Query Pk Count

    Share
      Administrators
      avatar

      Posts Posts : 645

      Points Points : 63281

      Thanks Thanks : 696

      Gender Gender : Male

      JoinDate JoinDate : 2010-11-25

      #1

       on Thu Jul 25, 2013 10:04 pm

      Add column in RanGame1 >Chainfo

      Column name "ChaKill" bigint not null

      then execute this on ranlog

      Code:
      set ANSI_NULLS ON
      set QUOTED_IDENTIFIER ON
      GO



      ALTER PROCEDURE [dbo].[sp_LogAction_Insert]
          @nChaNum int,
          @nType int,
          @nTargetNum int,
          @nTargetType int,
          @nExpPoint money,
          @nBrightPoint int,
          @nLifePoint int,
          @nMoney money
      AS   
          SET NOCOUNT ON
      IF (@nType=2)
          BEGIN
          Update RanGame1.dbo.ChaInfo
          Set ChaKill=ChaKill+1
          Where ChaNum=@nChaNum
          END

          INSERT INTO LogAction (ChaNum,  Type,  TargetNum,  TargetType,  ExpPoint,  BrightPoint,  LifePoint,  ActionMoney)
          VALUES    (@nChaNum, @nType, @nTargetNum, @nTargetType, @nExpPoint, @nBrightPoint, @nLifePoint, @nMoney)

          SET NOCOUNT OFF

      then create your custom ranking php script which will count values in chakill column



      b-) :d  :-l [You must be registered and logged in to see this link.] :-r :d  b-)

      Chú ý
      Like and Reply show Link