I'm newbie with mysql and this is my issue. I have a table in database called Room with one of its attribute as Floor. In the Floor column, there are 3 different names ( Walters, Gates, Pension).
I'm trying to fetch figures from table based on the selected floor and this is my query.
String query = "Select * from Rooms where Floor =" + Floor.getSelectedItem().toString();
This seems like the right query but i get an error thrown saying Unknown Column 'Walters' in where clause.
What am i not doing right?