Check your query with the following statement:
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
So you'll come to know the error.
Reputation Points: 153
Solved Threads: 229
Nearly a Posting Virtuoso
Offline 1,398 posts
since May 2008