Uzyskaj łączną liczbę zapytań MySQL - CSS-Tricks

Spisie treści
=50002) ( $sql="SHOW GLOBAL STATUS LIKE 'Questions'"; ) else ( $sql="SHOW STATUS LIKE 'Questions'"; ) (email protected)_query( $sql ); (email protected)_fetch_array( $result ); return $row('Value'); ) //helper function is needed to detect the exact mysql-version function getMysqlVersion() ( $sql = 'SELECT VERSION() AS versionsinfo'; $result = @mysql_query('SELECT VERSION() AS versionsinfo'); $version = @mysql_result( $result, 0, "versionsinfo" ); $match = explode('.',$version); return sprintf('%d%02d%02d',$match(0),$match(1),intval($match(2))); ) ?>

Ponieważ nazwa globalnej zmiennej mysql-status-zmiennej zawierającej liczbę zapytań zmienionych w późniejszych wersjach mysql, potrzebna jest funkcja pomocnicza do wykrycia dokładnej wersji mysql, którą używasz.

Interesujące artykuły...