Код: Выделить всё
$sql_drop_temptable = "...blabla...";
$sql_prepare = "it creates a temporary table; where I sum up later...";
$sql_summe = " select sec_to_time(sum(time_to_sec(summands))) from workday;";
$query = $this->db->query($sql_drop_temptable);
$query = $this->db->query($sql_prepare);
$query = $this->db->query($sql_summe)->row();
var_dump($query);
Мне сложно получить результат в скалярном виде.
Результат выглядит так:
Код: Выделить всё
object(stdClass)[41]
public 'sec_to_time(sum(time_to_sec(summands)))' => string '00:23:54' (length=8)
Подробнее здесь: https://stackoverflow.com/questions/186 ... t-clause-o
Мобильная версия