Raised This Month: $32 Target: $400
 8% 

Order by help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 05-11-2012 , 23:29   Order by help
Reply With Quote #1

How I can make this order?

PHP Code:
mysql_query('SELECT * FROM table ORDER BY '.round($a['dmg'] / max($a['wins'] + $a['losses'], 1)).' DESC'); 
__________________
kramesa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-11-2012 , 23:46   Re: Order by help
Reply With Quote #2

Show the table structure.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 05-11-2012 , 23:50   Re: Order by help
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
Show the table structure.
http://forums.alliedmods.net/showpos...24&postcount=4
__________________
kramesa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-12-2012 , 14:18   Re: Order by help
Reply With Quote #4

PHP Code:
mysql_query('SELECT * FROM table ORDER BY (dmg / (wins + losses)) DESC'); 
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode