At my current job, the standard practice has been to use mysql_query() and friends directly. When constructing large queries, since our standard deployment is on MySQL, table names just get inserted and surrounded by backticks (partial, fake example):
$sql .= "from `$tablename`";
I'm trying to get away from MySQL-ism's, and as part of that, moving toward PDO and/or ADOdb. But, I'm more familiar with Perl than PHP, and I was surprised I couldn't easily find the equivalent of DBI's quote_identifier, which takes either a sole table name, or the whole set of identifying information (catalog, schema, table). Am I overlooking something obvious?