Hey Dean,
I think that the pageid was in the modules table originally and this script was for the transition when the mp_pagemodules table was created (allowing modules to be placed on more than one page), it was later that the pageid was dropped from the mp_modules table.
I'll add the semi colon.
Thanks,
Joe