- Issue created by @vladimir.krupin
- 🇨🇭Switzerland phma Basel, CH
Same problem here and your solution works, thanks. The only downside is that it's MySQL specific. It's not an issue for us, but it might be for those using PostgreSQL.
So we could use ORDER BY CASE instead to ensure that 'und' comes last:
$rid = $this->connection->query('SELECT rid FROM {redirect} WHERE hash IN (:hashes[]) ORDER BY CASE language when :not_specified then 0 else 1 end DESC', [ ':hashes[]' => $hashes, ':not_specified' => LanguageInterface::LANGCODE_NOT_SPECIFIED ])->fetchField();
- 🇨🇭Switzerland phma Basel, CH
This patch takes both, query length and language into account.
- last update
over 1 year ago 62 pass, 2 fail - last update
over 1 year ago 63 pass - last update
over 1 year ago 63 pass - last update
over 1 year ago 63 pass