Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2007
    Posts
    5

    Question Unanswered: update cur_points with cur_points+points, then wipe points (was "Help needed please")

    Greetings everyone, I'm posting this thread with the hope that someone will notice it and might offer me a helping hand regarding one of my problems.


    I have the database named "DBEXAMPLE" with the table MEMB_INFO that contains two important columns that are named cur_points and points where cur_points column contains the total available points that a member can use/spend on a game and the points column stores the total of the points that a member used so far.

    So as i plan to wipe all data of the database, i need to keep the member login,password and total points that each member purchased.

    So i will somehow need to update the cur_points column with the total of current cur_points+points columns and then wipe points column.

    I've personally asked a friend regarding this and he said that this should be something complicated and it might require php also.

    Really appreciate if someone could help me regarding this.

    small schema:

    Database: DBEXAMPLE
    Table: MEMB_INFO
    Column cur_points -> total available points that a member can spend
    Column points -> total points that the member has already spent
    Column memb___id -> member login aka account id
    TODO -> update cur_points column with the total of cur_points+points columns for each member(buyer)

    With best regards.
    Last edited by 2SeXy; 06-22-07 at 22:14.

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    update memb_info set cur_points=cur_points+points, points=0

    ??

  3. #3
    Join Date
    Jun 2007
    Posts
    5
    I kind of doubt this would be so easy, keep it mind that each member has a different value of cur_points and points and there are arround 100.000 members

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    if each member has their own record in this table, then yes, it is that easy.

    you are just too sexy to realize it.

  5. #5
    Join Date
    Jun 2007
    Posts
    5
    Thank You, i just made a little test and indeed it does work, i never though it could work out so easily lol

  6. #6
    Join Date
    Jun 2007
    Posts
    5
    Quote Originally Posted by jezemine
    you are just too sexy to realize it.
    haha nice said

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •