Don't fully understand the language but it looks like you've not run all the sql queries needed when installing the hack. You need to add an attach to the pmtext table which it looks like you haven't done..
Code:
ALTER TABLE pmtext add attach int not null;
but make sure you've done all the other sql queries too (they are towards the very end of the install instructions)