Amount Won w k notation correct?

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Amount Won w k notation correct?

Postby js2002 » Sat Aug 30, 2008 4:44 am

hi,

could someone plz check this stat? (put this in definition and format)
Ich dont have opponents with winnings more than 1000$.
Is the "<" correct?!

if((amt_won>=1000 OR amt_won <='-1000'),format(format_money((amt_won / 1000),true),'k') ,format_money(amt_won,true))

EDIT: testet it and it didnt draw the k! anyone?
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: Amount Won w k notation correct?

Postby js2002 » Sat Aug 30, 2008 5:08 am

This one is far better:

DEF:
if((amt_won>=1000 OR amt_won <='-1000'),format('{1}k' ,(amt_won / 1000)),amt_won)

FORMAT:
if((amt_won>=1000 OR amt_won <='-1000'),format('{1}k' , format_money((amt_won / 1000),true)) , format_money(amt_won,true))
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 29 guests