Search in a mysql table with java

0
        String sentencia = 
            "%'"+"SELECT *\n"    +"FROM alumnos\n"+ 
            "WHERE dni LIKE '%"+filtrar+"%'"+ 
            "OR apyn LIKE '%"+filtrar+"%'"+ 
            " OR sexo LIKE '%"+filtrar+"%'" + 
            " OR fec_nac LIKE '%"+filtrar+"%'"+ 
            " OR cant_mat_aprob LIKE '%"+filtrar+"%'"+ 
            " OR promedio LIKE '%"+filtrar+"%'"+ 
            " OR fec_ing LIKE '%"+filtrar+"%'"+ 
            " OR carrera LIKE '%"+filtrar+"%"+ 
            " AND estado LIKE '%"+estado+"%'";

the compiler says there is a syntax error

    
asked by Facundo Caseres 15.07.2018 в 20:52
source

0 answers