Skip to content

Instantly share code, notes, and snippets.

@mneuhaus
Last active December 10, 2015 23:28
Show Gist options
  • Save mneuhaus/4509360 to your computer and use it in GitHub Desktop.
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'
<?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