PHP код:
format(str, sizeof(str), "SELECT SUM(`seconds`) as TotalSeconds FROM `user_times` WHERE `playerid` = %d;", PlayerInfo[playerid][pSQLID]);
new seconds = cache_get_field_content_int(0, "TotalSeconds");
If you had searched "mysql sum" on g00gle first result would have been a W3School link with an example for the query