<?php

function mysql_query($sql_query)
{
	return $_SESSION['dbh']->query($sql_query);
}

function mysql_fetch_array($result, $param="")
{
	if($param=="")
	{
		return $result->fetch_array();
	}
	else
	{
		return $result->fetch_array($param);
	}
}

function mysql_fetch_row($result)
{
	return $result->fetch_row();
}

function mysql_die($error = "")
{
	global $strError, $strMySQLSaid, $strBack, $sql_query, $dbh;

	echo "<HTML><b> $strError </b>";
	if(isset($sql_query) && !empty($sql_query))
	{
		display_lng_text("ERR_MYSQL");
		echo " : <b>$sql_query</b>";
	}
	if(!empty($error))
	{
		display_lng_text("ERR_MYSQL");
		echo " : ".$strMySQLSaid.$error;
	}
	if (function_exists('mysqli_error') && !function_exists('mysql_error'))
	{
		echo " : ".$strMySQLSaid.mysqli_error($dbh);
	}
	else
	{
		echo " : ".$strMySQLSaid.mysql_error();
	}
	echo "<p>";
}

?>