Click here to Skip to main content
13,287,856 members (50,724 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


Posted 11 Oct 2012

query database with selected variables in mysql

, 11 Oct 2012
MySqlCommand cmd = new MySqlCommand("Select * from table where variable = '@selectedValue'");cmd.Parameters.AddWithValue("@selectedValue", value);...


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

11 Oct 2012
Al Hizbul
select * from table where variable in (selected tableColumn from dropdownlist)
11 Oct 2012
3 alternatives  
i am trying to do a c# mysql select * from table where variable =(selected tableColumn from dropdownlist) like variable(text from text box does anyone know what the query should look like in my sql
16 Oct 2012
turns out you cannot use column names as a parameter in mysql so I wrote I different select statement for each column chose from the dropdown list


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
Canada Canada
No Biography provided

| | Privacy | Terms of Use | Mobile
Web03 | 2.8.171207.1 | Last Updated 11 Oct 2012
Article Copyright 2012 by fjdiewornncalwe
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid