CREATE TABLE `matthew` (
`member` varchar(255) collate latin1_general_ci NOT NULL default '',
`kills` int(10) unsigned NOT NULL default '0',
`deaths` int(10) unsigned NOT NULL default '0'
) ENGINE=InnoDB
this will not work:
SELECT member, kills, deaths, (kills / deaths) AS score
FROM `matthew`
ORDER BY score
maybe this is better:
SELECT member, kills, deaths,
IF (deaths, kills / deaths, 'flawless') AS score
FROM `matthew`
ORDER BY score
There is also a function to round:
SELECT member, kills, deaths,
IF (deaths, ROUND( kills / deaths, 1 ) , 'flawless') AS score
FROM `matthew`
ORDER BY score
is this what you where looking for?
http://animalliberation.tk http://veganismus.ch
http://maqi.de http://tierrechtskochbuch.de