That is a correct query, but it might not be correct in terms of your table structure. The query you have assumes you have a table called "events" that contains a field called "topic." If that is the case, then the problem likely lies in your $topic var. Are you sure it has a value?
Also, what you have is simply forming the query statement. Are you actually executing the statement with something like this: mysql_query($sql);?