To do multible compids, use the following script:
php /var/www/html_j3sg/institutions/ChangeCompidOfAllInstitutionalAfewCompaniesAtATime.php
Please note that the script mentioned above (ChangeCompidOfAllInstitutionalAfewCompaniesAtATime) only updates the current13FFilingpositions table, no archived tables.

This script actual updates 13F current table as well as both archive13F tables.

We got coming in compid: : 131004
SELECT companies.* , sectors.level3des FROM companies, sectors WHERE companies.sector = sectors.level3num and compid = '131004'

The Shares Amount is 21318000

The cusip is 54021P403
NOT OLD

Retrive Rows from Table:
select * from current13Fpositions where cusip = '54021P403'
Number of Rows :26

update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '32.12' where entryId = '3730918'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.94' where entryId = '9755724'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '31.1' where entryId = '10241157'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.01' where entryId = '11425983'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.01' where entryId = '12476849'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.89' where entryId = '13023985'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0' where entryId = '13818051'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.01' where entryId = '14003921'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.89' where entryId = '14679114'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0' where entryId = '14825016'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '2.01' where entryId = '14875817'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0' where entryId = '15473467'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '8.44' where entryId = '15632512'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.01' where entryId = '15803739'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.89' where entryId = '16195454'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.01' where entryId = '16727470'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0' where entryId = '16729274'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.61' where entryId = '17015645'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.89' where entryId = '17979097'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.01' where entryId = '18567693'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0' where entryId = '18569470'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.01' where entryId = '19053936'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0.89' where entryId = '19148855'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0' where entryId = '20920065'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '373.46' where entryId = '23173775'
update current13Fpositions set compid = '131004', sectorNum = '103004', sectorDes = 'Gambling/Resorts', issuerCik = '0001066138' , percentOut = '0' where entryId = '24521222'
End Function

Retrive Rows from Table:
select * from archive13F where cusip = '54021P403'
Number of Rows :0

End Function
The Script is complete, exiting....