This is code for get current date information is getting from database. It is working successfully.
public class RetailerWs {
public int data(){
int count=0;
//count++;
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager
.getConnection("jdbc:mysql://localhost:3306/pro","root","");
PreparedStatement statement = con
.prepareStatement("select * from orders where status='Q' AND date=CURDATE()");
ResultSet result = statement.executeQuery();
while(result.next()) {
// Do something with the row returned.
count++; //if the first col is a count.
}
}
catch (Exception exc) {
System.out.println(exc.getMessage());
}
return count;
}
}
my doubt is how is get current month details from database...how to do that…please help me.
dis is my database:

Here i wish to need output is if i run the above application means it is displayed the count value.if i wish to need output is the current month details.for eg:i get the current date information means the check the query and display count value is 2..it is worked successfully.here i wrote the query is
select * from orders where status='Q' AND date=CURDATE()".
it is successfully worked.same thing how is write the query for status=Q for current month…so now i wish to display the output is 2.but i can’t unable to do dis.so please help me.how is to do.how can i change my code.
try function
MONTH()of mysqlhere