Django check for any exists for a query

Posted by Hulk on Stack Overflow See other posts from Stack Overflow or by Hulk
Published on 2010-04-22T11:58:38Z Indexed on 2010/04/22 12:03 UTC
Read the original article Hit count: 262

Filed under:
|
|

In django how to check whether any entry exists for a query

       sc=scorm.objects.filter(Header__id=qp.id)

This was how it was done in php

     if(mysql_num_rows($resultn))
     {
      }
      else
      {

       }

© Stack Overflow or respective owner

Related posts about django

Related posts about django-views