Added mysqli segments, and generally improved the SQL parsing for PDO.