Browse files

Simplify syntax errors

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1270 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent e4bfffd commit 1a8a5fdadae6e1a093e0c968eb20fdeb82acdabe jakubvrana committed Dec 16, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 adminer/sql.inc.php
View
2 adminer/sql.inc.php
@@ -63,7 +63,7 @@
$start = explode(" ", microtime()); // microtime(true) is available since PHP 5
//! don't allow changing of character_set_results, convert encoding of displayed query
if (!$connection->multi_query($q)) {
- echo "<p class='error'>" . lang('Error in query') . ": " . h($connection->error) . "\n";
+ echo "<p class='error'>" . lang('Error in query') . ": " . h(preg_replace('~^You have an error.*syntax to use~U', "Syntax error", $connection->error)) . "\n";
if ($_POST["error_stops"]) {
break;
}

0 comments on commit 1a8a5fd

Please sign in to comment.