protected function getQueryType($timing)
    {
        $timing = ltrim($timing);
        preg_match('/^([a-zA-z]*)/', $timing, $matches);

        return count($matches) ? mb_strtoupper($matches[0], 'utf8') : '';
    }
protected function getQueryType($timing)
    {
        $timing = ltrim($timing);
        preg_match('/^([a-zA-z]*)/', $timing, $matches);

        return count($matches) ? mb_strtoupper($matches[0], 'utf8') : '';
    }
protected function getQueryType ( $ timing ) { $ timing = ltrim ( $ timing ) ; preg_match ( '/^([a-zA-z]*)/' , $ timing , $ matches ) ; return count ( $ matches ) ? mb_strtoupper ( $ matches [ 0 ] , 'utf8' ) : '' ; }
Returns database query type.

@param string $timing timing procedure string
@return string query type such as select, insert, delete, etc.
Returns database query type .