So there is no default way to order by 'ID"?

On Fri, Oct 17, 2008 at 7:53 AM, djidjadji <[EMAIL PROTECTED]> wrote:

>
> > but in the data base how can i store unique number which should
> > incremented.
> In the datastore create an object with only an IntegerProperty (counter).
> It has a method that increments the value of the counter with an
> transaction and returns
> the previous value. Parameters for the transaction is the Key of the
> count object, do not pass
> the object, You can give the object a key_name and use
> counter = CountClass.get_by_key_name(keyname)
> inside the transaction
>
> > Please help me i am not able to Fetch data using where clause.
> Always use parameters in the WHERE clause.
>
> MyModel.gql("WHERE prop = :1", propval).fetch(100)
>
>
> 2008/10/16 Gampesh <[EMAIL PROTECTED]>:
> >
> > Hi,
> >
> > I am new in google app engine and Gql as well.
> >
> > i have made class as follows:
> >
> > class MyBooks(db.Model):
> >  book_id=db.IntegerProperty(name='key')
> >  author = db.StringProperty(multiline=True)
> >  book_name = db.StringProperty(multiline=True)
> >  price = db.IntegerProperty()
> >  date = db.DateTimeProperty(auto_now_add=True)
> >
> > but in the data base how can i store unique number which should
> > incremented.
> >
> > table structure in Gql after run the app is
> >
> > "ID/Name        author  book_id         book_name       date    key
> price" and we have
> > made only  "author      book_id         book_name       date    price"
> only. Then why
> > "ID/Name and key " field are made automatically. Also i am not able to
> > use "ID/Name" in Gql query's where class like "WHERE  ID/Name = '1' "
> >
> >
> > Please help me i am not able to Fetch data using where clause.
> >
> >
> >
> > Thanks,
> > Gampesh
> >
> > >
> >
>
> >
>


-- 
Stay hungry,Stay foolish.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to