MYSQL_CONNECT(hostname,username,password);
will connect to the server
@MYSQL_SELECT_DB ("databasename");
will select the database
MYSQL_QUERY("insert your sql query here");
will run the query
OR DIE can be added at the end of a line to output an error message if the line fails, e.g:
MYSQL_CONNECT(localhost,myusername,mypassword) OR DIE ("Failed to connect to server");
Hope this helps,
Dave