Right, ok thanks was straightforward enough.
Unfortunately when I ran the query some tables didnt exist so I am going to assume the database was partially destroyed as well as the codebase and I'm just going to have to start again. Ill try and import some things from the various tables using the import tool.
Thanks anyway for your help