webmatrix - C# Get MAX value -



webmatrix - C# Get MAX value -

is right way max value (id) database , substrat 6 it?

var photoso = db.querysingle("select max(id) photos"); var toto = photoso - 6;

it telling me can not utilize '-' opperator between webmatrix.data.dynamicrecord , int

photoso homecoming collection of info your. 1 object, utilize name in collection. accessing object in array or list using index number.

you code as

photoso - 6 webmatrix.data.dynamicrecord , int

try code instead

var photoso = db.queryvalue("select max(id) photos"); var toto = (photoso - 6); // column id collection info

this work.

here tutorial mike brind: http://www.mikesdotnetting.com/article/214/how-to-check-if-a-query-returns-data-in-asp.net-web-pages

c# webmatrix

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -