java - How to return mysql function select count -
i tring count value of sql select using mysql function. functions executes without errors when try value using java following error appeared. 25-may-2016 05:14:02.180 severe [http-nio-8084-exec-109] core.applicationmgt.get_new_application_count null com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: unknown column 'temp' in 'field list' here mysql funtion delimiter // create function application_api_get_new_application_count() returns integer begin if((select count(*) temp application_view status = 'new')>0) return temp; end if; return 0; end// this function call point public int get_new_application_count() { callablestatement stmt; int temp_ = 0; try { stmt = mysqlmanager.getdbconnection().preparecall("{ ? = call application_api_get_new_application_count()}"); stmt.registeroutparameter(1, java.sql.types.integer); stmt.execute(); temp_ = s