mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 11:34:10 +02:00
Highlight line with error in SQL command
This commit is contained in:
@@ -510,6 +510,16 @@ if (!defined("DRIVER")) {
|
||||
return h(preg_replace('~^You have an error.*syntax to use~U', "Syntax error", $connection->error));
|
||||
}
|
||||
|
||||
/** Get line of error
|
||||
* @return int 0 for first line
|
||||
*/
|
||||
function error_line() {
|
||||
global $connection;
|
||||
if (ereg(' at line ([0-9]+)$', $connection->error, $regs)) {
|
||||
return $regs[1] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/** Return expression for binary comparison
|
||||
* @param string
|
||||
* @return string
|
||||
|
Reference in New Issue
Block a user