couting from mysql database in c# -


i have bit of dilemma. trying grab of products database customer may purchase. however, have no idea how write in c#:

"keep adding 'list' while there still items in database match order_id."

this query string.

            productquery = "select * wdb_orders_products orders_id = @orders_id"; 

i confused put in here, work mysql.

                while (reader.read())             {                 for(int x=0; x< ??? ; x++)                 db_products[0] = reader["products_name"].tostring();             } 

this im trying grab mysql table site.

orders_id-------products_name

52----------------90-96nissan 300zx tail light

52----------------90-96nissan 300zx bumper

52----------------some other item

simple example

var list = new list<string>(); while (reader.read()) {     list.add(reader["products_name"].tostring());  } 

but recommend create class product properties need !


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -