Re:data grabbing and mathematics!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Okay I have this:

<snip>
$sql = "UPDATE round" . ($round_number -1) . " SET
score=score+1 WHERE $select='$winner'";
</snip>

Which works as it should.

Now after all that is completed how is the best way to
retrieve the nickname and the score in that round and
update another table?

Okay two tables, one is round5 (for instance) and the
other is tipping.

So ....

round5 table:
Nickname:         Score:
Bob               5
Bill              4
Fred              3

So I want to grab each nicknames score and UPDATE the
tipping table.

tipping table:
Nickname:        Score:
Bob              24
Bill             31
Fred             30

So we need to add 5 for bob and 4 for bill and 3 for
fred on top of their current score.  So for instance
Bob would go to 29.

What is the best way to do this?  I need the nicknames
round score to update their total score and be
reliable to update the right nickname.

This would solve a bit of my time mucking around and
re-structuring my database until I have more time. :)

If you need more information please let me know.

Jerry

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux