ColorStatus has it own dropdownbox value, and also ColorLocation has dropdownbox values relating to the dataset. Can you help me figure out the correct
where clause for the three filters below. all the value are strings, so you can make up any value now
| ColorType: | ColorStatus: | ColorLocation: |
| select type | select status | select location |
Select ColorID, ColorType, ColorNotes, ColorStatus
From Color Table
Where ????
ThomasPosted Jul 25, 2012, 5:44 PM
A couple notes on the code below, the " + lets you code to the next line for easy reading. Just make sure you leave a space before the " of the two lines will run together, and in the where note the single quotes next to the double quotes
String MySQL = "Select ColorID, ColorType, ColorNotes, ColorStatus " +
"From ColorTable "+
"Where Colortype = '" + Selectedtype + "' " +
"AND colorStatus = '" + SelectedStatus + "' " +
"AND colorLocation = '" + SelectedLocation + "' ";
This will result in a string that will look like this:
Select ColorID, ColorType, ColorNotes, ColorStatus From ColorTable Where Colortype = 'Selectedtype' AND colorStatus = 'SelectedStatus' AND colorLocation = 'SelectedLocation'