Last active
December 10, 2015 23:28
-
-
Save mneuhaus/4509360 to your computer and use it in GitHub Desktop.
WTF: My Personal TheDailyWTF for today. FYI the gibberish is german and 'irgendeinstatement' stands for 'somestatement'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function irgendeinstatement($sql){ | |
$link = mysql_connect($this->host,$this->user,$this->pw); | |
if (!$link) { | |
die('keine Verbindung möglich: ' . mysql_error()); | |
} | |
mysql_select_db($this->db); | |
if(!$sql){ | |
echo "Leider gibt es keine sql-Abfrage<br/>\n"; | |
} | |
$result = mysql_query($sql); | |
if($result){ | |
// while ($row = mysql_fetch_assoc($result)) { | |
// $row_array[] = $row; | |
// } | |
echo "<!-- Alles ok für irgendeinupdate -->"; | |
} | |
else{ | |
echo "<!-- Keine Datenbankergebnisse für irgendeinupdate -->"; | |
} | |
return true; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment