• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Earliest object in a table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Earliest object in a table


  • Subject: Re: Earliest object in a table
  • From: shaun <email@hidden>
  • Date: Thu, 23 Nov 2006 14:34:19 +1030

Baiss Eric Magnusson wrote:
There must be a few lines, utilizing EOUtilities calls,
that would yield the earliest object, date wise, (there is a stored NSTimestamp field), from a table "Posts".


Would someone care to share them?



Perhaps something like the following: String sql = "select id from post where created_date= (select min(created_date) from post)";

//whatever the rawrows method is called.
NSArray results = EOUtils.rawRowsForSQL(sql)

NSDictionary row =(NSDictionary)results.objectAtIndex(0);

//whatever the method is called.
Post p = (Post)EOUtils.objectFromRawRow(row);

HTH.
 - shaun
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Earliest object in a table (From: Baiss Eric Magnusson <email@hidden>)

  • Prev by Date: Re: Earliest object in a table
  • Next by Date: Re: WebServices Assistant: unable to launch
  • Previous by thread: Re: Earliest object in a table
  • Next by thread: D2W question
  • Index(es):
    • Date
    • Thread