Example #1
0
 public static function query($sql)
 {
     self::$last_result = mysql_query($sql);
     $err = mysql_error();
     if ($err !== '') {
         echo "<table align='center' border=1>";
         echo "<tr><td align='center'><font color=red><b>ОШИБКА MYSQL!</b></font></td></tr>";
         echo "<tr><td>";
         echo "<b>{$err}</b><br>{$sql}";
         echo "</td></tr></table>";
         return false;
     }
     return self::$last_result;
 }