sql - Showing the result of a query -
i'm trying build query numbers of rows have same data on column (my column estado).
var db = database.open("mydb"); var selecteddata = db.query("select count (*) graficos estado='fechado'"); var data = db.queryvalue(selecteddata);
but when try run gives following error:
compiler error message: cs1502: best overloaded method match 'webmatrix.data.database.queryvalue(string, params object[])' has invalid arguments line 51: var data = db.queryvalue(selecteddata);
pass query directly queryvalue()
method.
var data = db.queryvalue("select count (*) graficos estado='fechado'");
read this documentation more information on how use database.queryvalue()
method.
Comments
Post a Comment