I have a basic html page that I want to display a table on, populated from a SQL query.
I want to display all part numbers that are classified as essential items, that are out of stock.
I'm using CSHTML, razor syntax on webmatrix. I tried this:
var nilstock = db.QueryValue("select STOCKCODE, TOTALSTOCK from dbo.STOCK_ITEMS where STOCK_CLASSIFICATION in(170,190,200) and TOTALSTOCK <1 order by STOCKCODE");
I then call this var later, by@nilstock.ToString() or even just @nilstick but it returns only the first affected cell.
Any help gratefully accepted..:)
QueryValuewould return a single value instead of a full result set.