[mysql]: partial generation of sql for where statements