Affected_Rows().'] '.$after;
}
if($newline) $msg .= "
\n";
if( defined('SQL_TO_SCREEN') && SQL_TO_SCREEN == 1 ) echo $msg;
if( defined('SQL_TO_FILE') && SQL_TO_FILE == 1 )
{
if($file_reset == false && defined('SQL_OVERWRITE') && SQL_OVERWRITE)
{
if( file_exists(SQL_OUTPUT) ) unlink(SQL_OUTPUT);
$file_reset = true;
}
$msg = str_replace(Array("
\n",'
','<','>','"'),Array('','','<','>','"'),$msg);
$fp = fopen(SQL_OUTPUT, 'a');
fwrite($fp,$msg);
fclose($fp);
}
}
/**
* @return string
* @desc Returnts trace results to place where called from
*/
function trace()
{
$trace_results = debug_backtrace();
array_shift($trace_results);
echo 'Called from ['.$trace_results[0]['function'].']
';
print_pre($trace_results);
}
function DebugByFile()
{
$ScriptName = basename( $_SERVER['PHP_SELF'] );
switch ($ScriptName)
{
case 'step3.php':
global $objSession;
$objSession->SetVariable('import_sql_type', 'mysql');
$objSession->SetVariable('import_server', 'localhost');
$objSession->SetVariable('import_db', 'alex_in_portal'); //maris_inlink');
$objSession->SetVariable('import_user', 'dev');
$objSession->SetVariable('import_pass', 'dev-25-sql');
$objSession->SetVariable('categoryid', 101); // resource id
$objSession->SetVariable('import_category_id', 1); // category id
$objSession->SetVariable('catnavbar', 'Home>Directory (debug_auto_complete)');
$objSession->SetVariable('user_admin_names','admin');
$objSession->SetVariable('user_admin_values', 11);
$objSession->SetVariable('user_regular_names','Member');
$objSession->SetVariable('user_regular_values', 13);
break;
}
}
?>