mysql.h
TIME_TO_SEC()
TIME_TO_SEC(time)
Devuelve el argumento time convertido en segundos:
mysql> SELECT TIME_TO_SEC('22:23:00'); +-------------------------+ | TIME_TO_SEC('22:23:00') | +-------------------------+ | 80580 | +-------------------------+ 1 row in set (0.00 sec) mysql> SELECT TIME_TO_SEC('00:39:38'); +-------------------------+ | TIME_TO_SEC('00:39:38') | +-------------------------+ | 2378 | +-------------------------+ 1 row in set (0.00 sec)