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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -