$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
@$Erg = mysql_query($SQL, $con);
@$Erg = mysql_query($SQL, $con);
//if(!mysql_error($con))
if( mysql_num_rows( $Erg) == 1)
if( mysql_num_rows( $Erg) == 1)
return (@mysql_result($Erg, 0, "Text"));
return (@mysql_result($Erg, 0, "Text"));
else
else
{
{
// die("Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x");
array_push($error_messages, "Get_Text, '$TextID' found ". mysql_num_rows( $Erg). "x in Sprache Database Table for Language (".$_SESSION['Sprache'].")\n");
return "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
return "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
}
}
@ -27,7 +27,7 @@ function Get_Text ($TextID)
function Print_Text ($TextID)
function Print_Text ($TextID)
{
{
GLOBAL $con;
GLOBAL $con, $error_messages;
if( !isset($_SESSION['Sprache']))
if( !isset($_SESSION['Sprache']))
$_SESSION['Sprache'] = "EN";
$_SESSION['Sprache'] = "EN";
@ -39,11 +39,11 @@ function Print_Text ($TextID)
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
@$Erg = mysql_query($SQL, $con);
@$Erg = mysql_query($SQL, $con);
// if(!mysql_error($con))
if( mysql_num_rows( $Erg) == 1)
if( mysql_num_rows( $Erg) == 1)
echo nl2br(@mysql_result($Erg, 0, "Text"));
echo nl2br(@mysql_result($Erg, 0, "Text"));
else
else
{
{
array_push($error_messages, "Get_Text, '$TextID' found ". mysql_num_rows( $Erg). "x in Sprache Database Table for Language (".$_SESSION['Sprache'].")\n");
echo "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
echo "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";