Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/database/perform/db_mysql.php
<?php
/**
 * @version	$Revision: 1.4 $
 * @author	Stefan Rottensteiner
 */
require_once('../../../include/init.inc');
if(!$USER->check_feature('Admin') && !$USER->check_feature('ac_database'))
{
	$USER->login_call();
}

$start_time = time();

$text	= '';
for ($i = 0; $i < $CFG_REPETITIONS; $i++)
{
	@set_time_limit(0);
	echo '. ';
	keepConnect();
	$times['connect'][$i]['a'] = getmicrotime();
	$con 		= ( $CFG_PERSISTENT ? mysql_pconnect($CFG_DSN,$CFG_USER_NAME,$CFG_USER_PASS ) : mysql_connect($CFG_DSN,$CFG_USER_NAME,$CFG_USER_PASS ) );
	mysql_select_db ( $CFG_TABLESPACE,$con);
	$times['connect'][$i]['b'] = getmicrotime();

	$times['query'][$i]['a'] = getmicrotime();
	$result 	= mysql_query($CFG_STATEMENT,$con);
	$times['query'][$i]['b'] = getmicrotime();

	$times['read'][$i]['a'] = getmicrotime();
	$rows 		= mysql_num_rows($result);
	while ( $rows )
	{
		$row = mysql_fetch_row($result);
		if ($SHOW_RESULT) $text.= "[$i][ - Data - ]<br>";
		$rows--;
	}
	$times['read'][$i]['b'] = getmicrotime();

	$times['disconnect'][$i]['a'] = getmicrotime();
	mysql_free_result ($result);
	mysql_close($con);
	$times['disconnect'][$i]['b'] = getmicrotime();
}

$end_time = time();
?>
Return current item: Netautor Professional