Then echo out the mysql_query to see what is being sent to MySQL. Have you used
PHP: mysql_error - Manual
It would be much easier for people to help you if you would post some of the requested output - even if it is exactly what you expect. You could also post the database schema.