bulk change php type?

Hi, I've done a migration, all gone fine the only thing I need to do is change about 1000 sites from suphp to fast cgi. I tried updating this in the db (a simple 'UPDATE SET php='fast-cgi') but ispconfig didnt apply the changes to the vhosts file so thats obviously not how it works. Any ideas for easy ways to do this? Could make a script through the API, would be a bit of effort but still quicker than doing 1000 by hand