How do you insert variables into an SQL Query?
This is what I have so far ...
public String getBugList(int amount) {
Connection con = DatabaseConnection.getConnection();
try (PreparedStatement ps = con.prepareStatement("SELECT submitter, report FROM bugs_log ORDER BY id DESC limit ))
}
I'm trying to get "amount" bugs to list. So if I input 2, then only the top 2 will get listed.