SQL database

well i followed the tut on the wiki and even got to the point where i just copied the final code but even then i got an error about the farm variable so now i just want it to work. I would really like it if some one made me one that has a couple a variables so that i can kinda just have a working template.
Edit: Nvm got it working