How would I go about..
#1

Making a Kill Death Ratio mysql wise?

~ Regards, Luis.
Reply
#2

When you UPDATE, "%f", killsvar/deathsvar and put that integer in a new row.
Reply
#3

pawn Код:
UPDATE .. Ratio = %f..", floatdiv(kills, deaths)
Reply
#4

It's as simple as a regular mathematic question. I don't know why people are calling natives to divide when SQL has its own arithmetic division operator. Here's an example query:

pawn Код:
mysql_query( "UPDATE accounts SET Ratio = '%i / %i' WHERE name = '%s'", kills, deaths, name );
Reply
#5

If I am correct it would be a FLOAT on the mysql table?
Reply
#6

Alrighty, got it working. Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)