Monday, December 23, 2013

I can't figure out the django qeryset for retriving a value from a field by a condition

HI, 
My model like this 
 
        mobile_name = models.CharField("Mobile Name", max_length=50)
opinion = models.CharField('Comments', max_length=2000)
total = models.FloatField('Total Mark')


the sql qery should like this "SELECT total FROM tablexyz WHERE mobile_name=xyz"

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/faf3674f-c1c6-41f6-98c6-a01b12d5d6f9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment