Try checking the syntax of your SQL statement... echo it before executing it. I find this solves most of my problems.
If that doesn't work,
You must provide us with a description of the table (column names, types, etc) AND the SQL statement you are trying to execute.