Well you can try to run it again and see what happens but I am wondering what is wrong with your database tables or config files etc. Note if you look at the lines your script is meantioning that it can not do.
515-517
Code:
Content visible to verified customers only.
523-525
Code:
Content visible to verified customers only.
531-533
Code:
Content visible to verified customers only.
There is nothing wrong with the queries they are sound. It leads me to what I asked about your config file as if the config has the proper info to make a database connection and the table prefix is right those queries will not fail
Code:
Content visible to verified customers only.