I have a function that\'s like
function getInfoById($id, $info) { }
the idea is to have a query be \"SELECT $info FROM table WHERE i
\"SELECT $info FROM table WHERE i
What about using quote and substr.
$sql = 'SELECT * FROM table WHERE `' . substr($db->quote($field), 1, -1) . '` = :id';
This will remove the quotes surrounding the escaped field.