com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'show order by show_id' at line 1
public class ShowDao{
public List findAll3 () throws Exception{
List showList=new ArrayList();
Connection conn =JDBC.getConnection();
String sql="select * from show order by show_id";
PreparedStatement pstat=conn.prepareStatement(sql);
ResultSet rs =pstat.executeQuery();
while(rs.next()){
Show show=new Show();
show.setShow_id(rs.getInt("show_id"));
show.setShow_image(rs.getString("show_image"));
showList.add(show);
}
return showList;
}
}