Click here to Skip to main content
Click here to Skip to main content

Tagged as

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);...

Alternatives

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)
10 Oct 2012
mrDivan
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
mrDivan
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

License

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

Share

About the Author

fjdiewornncalwe
Software Developer (Senior)
Canada Canada
No Biography provided

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