Search code examples
phpmysqldatabaseormidiorm

Idiorm query count


Count queries

A long time ago I think I was able to count the total queries made on a page with idiorm.

Now I can't find out how it's done. Any reference?


Solution

  • One can request the value of the session's Questions status variable:

    $questions = ORM::for_table(null)
                    ->raw_query('SHOW STATUS LIKE ?', ['Questions'])
                    ->find_one()
                    ['Value'];