I met a problem I can't really explain, using java/sqlite:
String sql = "Select date, type FROM line ORDER BY ?";
PreparedStatement st = DB.getConnexion().prepareStatement(sql);
st.setString(1, sort);
ResultSet rs = st.executeQuery();
This piece of code gives me the wrong order (default order) [and trust me I checked and rechecked that the parameter was good]
String sql = "Select date, type FROM line ORDER BY " + sort;
PreparedStatement st = DB.getConnexion().prepareStatement(sql);
//st.setString(1, sort);
ResultSet rs = st.executeQuery();
And this one produces the expected result. I'm a bit at loss here, this makes no sense to me. I tried to restart eeclipse, rebuild project, tested my request directly from sqlite browser, checked the parameter and results at every possible place, but it seems that sqlite's setString() function doesn't properly attributes my parameter, and it doesn't even crash or produce an error.
I'm either missing something really stupid or there's something very wrong going on here.