Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/database/perform/db_mssql.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++)
{
	echo '. ';
	keepConnect();
	$times['connect'][$i]['a'] = getmicrotime();
	$con 		= ( $CFG_PERSISTENT ? mssql_pconnect($CFG_DSN,$CFG_USER_NAME,$CFG_USER_PASS ) : mssql_connect($CFG_DSN,$CFG_USER_NAME,$CFG_USER_PASS ) );
	mssql_select_db ( $CFG_TABLESPACE,$con);
	$times['connect'][$i]['b'] = getmicrotime();

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

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

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

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