You could use the Webassist->Database->Repeating Table command to add all of the necessary code at once.
I'm unable to reproduce that error on a new page, it might have something to do with your page or what you have highlighted. Can I get FTP access to your server and a URL to view the page? Then I could try to replicate the error with the same files and database connection to see if I get the error. Without reproducing the error I can't really fix it.