That sounds like something I wrote.
https://github.com/mikecao/sparrow
It's a simple class that builds and executes SQL, but you can customize query at any time.
https://github.com/mikecao/sparrow
It's a simple class that builds and executes SQL, but you can customize query at any time.
[1] https://github.com/kla/php-activerecord