Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/database/perform/db_odbc.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 ? odbc_pconnect($CFG_DSN,$CFG_USER_NAME,$CFG_USER_PASS ) : odbc_connect($CFG_DSN,$CFG_USER_NAME,$CFG_USER_PASS ) );
	$times['connect'][$i]['b'] = getmicrotime();

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

	$times['read'][$i]['a'] = getmicrotime();
	while ($row = odbc_fetch_row ($result) )
	{
		$data1	= odbc_result($result,1);
		$data2	= odbc_result($result,2);
		if ($SHOW_RESULT) $text.= "[$i][ - DATA - ]<br>";
	}
	$times['read'][$i]['b'] = getmicrotime();

	$times['disconnect'][$i]['a'] = getmicrotime();
	odbc_free_result ($result);
	odbc_close($con);
	$times['disconnect'][$i]['b'] = getmicrotime();
}
$end_time = time();
?>
Return current item: Netautor Professional