i am having trouble in writing SQL query
I have a database mysql CRICKET:
id cricketer run cricketer2 run2 cricketer3 run3
9 dhoni 100 ashwin 50 raina 25
10 ABD 100 gayle 99 virat 15
Using the above database i have to take cricketers and add n=3;
$sql = "select (cricketer+cricketer2+cricketer3) as crick,
(run+run2+run3/n) as run
from CRICKET
WHERE id ='9' "
mysql_query($sql) or die(mysql_error());
I need the data look like this after using select query
crick run
dhoni 58
ashwin 58
raina 58*
can anyone adjust the query my above query is not working