Philipp Dunkel 2009-11-25 22:33:43 +00:00
parent f773cd7e9a
commit 8a8222a59b

View file

@ -25,6 +25,8 @@
// if($_SESSION['profile']['id'] > 0) // if($_SESSION['profile']['id'] > 0)
// session_regenerate_id(); // session_regenerate_id();
$pageLoadTime_Start = microtime(true);
$junk = array(_("Face to Face Meeting"), _("Trusted Third Parties"), _("Thawte Points Transfer"), _("Administrative Increase"), $junk = array(_("Face to Face Meeting"), _("Trusted Third Parties"), _("Thawte Points Transfer"), _("Administrative Increase"),
_("CT Magazine - Germany"), _("Temporary Increase"), _("Unknown")); _("CT Magazine - Germany"), _("Temporary Increase"), _("Unknown"));
@ -922,4 +924,22 @@
return $name; return $name;
} }
/**
* Run the sql query given in $sql.
* The resource returned by mysql_query is
* returned by this function.
*
* It should be safe to replace every mysql_query
* call by a mysql_extended_query call.
*/
function mysql_timed_query($sql)
{
global $sql_data_log;
$query_start = microtime(true);
$res = mysql_query($sql);
$query_end = microtime(true);
$sql_data_log[] = array("sql" => $sql, "duration" => $query_end - $query_start);
return $res;
}
?> ?>