From cac00eb3fba8b54c38104757c1d00a089af9fa60 Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Wed, 24 Dec 2014 11:46:27 +0100 Subject: [PATCH] update documentation --- centreon-plugins/docs/developer/guide.rst | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/centreon-plugins/docs/developer/guide.rst b/centreon-plugins/docs/developer/guide.rst index 8058df03c..87b1ae477 100644 --- a/centreon-plugins/docs/developer/guide.rst +++ b/centreon-plugins/docs/developer/guide.rst @@ -1301,3 +1301,39 @@ In your mode : Then, you are connected to the MySQL database. +query +----- + +Description +^^^^^^^^^^^ + +Send query to database. + +Parameters +^^^^^^^^^^ + ++-------------------+-----------------+-------------+---------------------------------------------------------+ +| Parameter | Type | Default | Description | ++===================+=================+=============+=========================================================+ +| query | String | | SQL query to send. | ++-------------------+-----------------+-------------+---------------------------------------------------------+ + +Example +^^^^^^^ + +This is an example of how to use query function : + +.. code-block:: perl + + $self->{sql}->query(query => q{SHOW /*!50000 global */ STATUS LIKE 'Slow_queries'}); + my ($name, $result) = $self->{sql}->fetchrow_array(); + + print 'Name : '.$name."\n"; + print 'Value : '.$value."\n"; + +Output displays count of MySQL slow queries. + + + + +