chrisguk, I applaud your desire to make your queries safe from attack. So many folks just want to get something done without any regard for security and that's why things are so easy to hack.
As a general rule, attacks target code that deals with user input. You can't hack a server without writing data to it at some stage -- either during software install or when making a request (HTTP, MySQL, ssh, etc.) to send data to/from the server.
Your script above does not stick any user input into your query so the query will always be the same exact query. It's when you start taking user input and modifying your query that you need to watch out. There are two major techniques to make this safe:
1) Validate the user input to make sure it is actually a number or email address or whatever before you stick it in your query. (helpful functions are [man]filter_var[/man] and [man]preg_match[/man])
2) Either escape the user input with something like mysqli's escape function or use prepared statements which take care of escaping data for you.