A quick hint on debugging sql problems is to print your sql statement. It would have helped here ;)
Code:
$query="SELECT movie_name,movie_type ".
"FROM MOVIE".
"WHERE movie_year>1990 ".
"ORDER BY movie_type ";
echo $query;
Gives us:
Code:
SELECT movie_name,movie_type FROM MOVIEWHERE movie_year>1990 ORDER BY movie_type
See the missing space? So, try:
Code:
$query="SELECT movie_name,movie_type ".
"FROM MOVIE ". // <-- extra space here
"WHERE movie_year>1990 ".
"ORDER BY movie_type ";
echo $query;
And we get:
Code:
SELECT movie_name,movie_type FROM MOVIE WHERE movie_year>1990 ORDER BY movie_type
HTH
Charlie
--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock:
http://charlieharvey.org.uk