Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Source
- 391 }
- 392
- 393 function databaseError($msg, $errorLevel = E_USER_ERROR) {
- 394 // try to extract and format query
- 395 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
- 396 $formatter = new SQLFormatter();
- 397 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
- 398 }
- 399
- 400 user_error($msg, $errorLevel);
- 401 }
- 402 }
- 403
- 404 /**
- 405 * A result-set from a MySQL database.
- 406 * @package sapphire
Add Comment
Please, Sign In to add comment