The exploit relies on the behavior of backtick quotes in mySql, which I'd never encountered before. Do other SQLish databases have similar features?
SQLite supports all three: https://www.sqlite.org/lang_keywords.html
... AND password = password = 1
is just wrong, quoted or not.This is just a cascading chain of failures.
However, proper DBMSs expose parameters as 1st class concepts through the API. That has several advantages, some of which:
1) It is more secure, as you will not have to do this dangerous escaping before invoking. Parameters are substituted by the DBMS.
2) The DBMS can better understand the "dynamic" part of a query and cache query plans.