A 91st minute Kenny Miller stole all three points for the Bluebirds after the Hammers had missed a host of chances to take the game.
New-boys Kevin Nolan, Joey O’Brien and Matt Taylor all impressed on their debuts but wastefulness up front from Piquionne, Sears and Cole and a defensive lapse from Herita Ilunga cost the Hammers dearly.
Both Robert Green and Scott Parker, linked with moves back to the Premier League, started the game for the Hammers, in a strong looking side.