Just had flashbacks to writing PHP. Considering this is still an idiomatic style of writing PHP speaks to the problems of the language. That SQL injection venerability is also plain as day.
Ha, exactly why I stopped using a db after v1, it's been flat cached json files since then