Pessoal tenho esta função…
public String consultaDado(String oque, String tabela, String compara, String valor){
String retorno="", query = "SELECT '"+oque+"' FROM '"+tabela+"' WHERE '"+compara+"'='"+valor+"'";
...
mas ela me da o seguinte problema quando coloco pra executar…
java.sql.SQLException: You have an error in your SQL syntax. Check the manual t
hat corresponds to your MySQL server version for the right syntax to use near ‘’
perfil’ WHERE ‘CPF’=‘12345678909’’ at line 1
O que pode ser ???