Thread: php
View Single Post
Old April 23rd, 2008, 01:33 AM
asim_pc asim_pc is offline
Registered User
Join Date: Apr 2008
Location: Peshawar, N.W.F.P, Pakistan.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default php

When I running this programme to retrieve the data from table,
its gives me this type of error in browser window, given below .

You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax
 to use near '>1990 ORDER BY movie_type' at line 1.

Please tell me about its solution.

Thank You.

This is the programme given below.

$connect=mysql_connect("localhost","root","asimpc" )
or die("Hey loser,check your server connection.");

$query="SELECT movie_name,movie_type ".
       "FROM MOVIE".
       "WHERE movie_year>1990 ".
       "ORDER BY movie_type ";
or die(mysql_error());

echo $movie_name;
echo " - ";
echo $movie_type;
echo "<br>";