http://qs321.pair.com?node_id=11142192


in reply to Re^8: Best practices for closing database connections?
in thread Best practices for closing database connections?

This makes me shudder:

$statement = sanitize($statement);

Sanitizing a statement as a whole either means that you actually need to parse the statement, or, more likely, you are making some assumptions about your statements, like "column names don't contain single quotes". This may work for your application as of now, but I'd not recommend it.