Suggestion: If leading whitespace is allowed in
queries, then the queries can (optionally) be formatted
more nicely, e.g.:
$result = $db->query("
(The lines of the query are indented above, but that
may not show up here.)
I think this is more readable for long or complex queries.
Insert at beginning of XoopsMySQLDatabaseProxy::query()
$sql = ltrim($sql);
An equivalent solution would be to revert to using
preg_match, rather than substr, and allow leading
whitespace in the regex pattern: