$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
@$Erg = mysql_query($SQL, $con);
//if(!mysql_error($con))
if( mysql_num_rows( $Erg) == 1)
return (@mysql_result($Erg, 0, "Text"));
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";
}
@ -27,7 +27,7 @@ function Get_Text ($TextID)
function Print_Text ($TextID)
{
GLOBAL $con;
GLOBAL $con, $error_messages;
if( !isset($_SESSION['Sprache']))
$_SESSION['Sprache'] = "EN";
@ -39,11 +39,11 @@ function Print_Text ($TextID)
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
@$Erg = mysql_query($SQL, $con);
// if(!mysql_error($con))
if( mysql_num_rows( $Erg) == 1)
echo nl2br(@mysql_result($Erg, 0, "Text"));
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";