Ok, I know what the problem is, the way PHPMySQL shows the queries is not even accepted by itself, quite funny. Basically you need to take out all the ` characters and it will work. I'll fix the instructions in a second.
Meanwhile, I have a little announcement about the future of this hack. I decided to integrate it with Erwin's Flash Player hack and make my own, free version of an arcade that will also play movies, manage the files and much more. The next version should be a fully functional gallery, and I hope to release it by the end of the week.