|
Add this functions to your entrygateway. <cfset variables.recentEntryDays = 0 /> <cffunction name="init"
access="public" hint="I configure and return the
WntryGateway" output="false"
returntype="EntryGateway"> <cfargument
name="recentEntryDays" hint="I am the number of days an entry is
recent." required="yes" type="numeric" /> <cfset
variables.recentEntryDays = arguments.recentEntryDays /> <cfreturn this /> </cffunction> <cffunction name="getAuthor" access="public"
hint="I return the author who created a record"
output="false" returntype="query"> <cfargument
name="entryId" hint="I am the entryId to match"
required="yes" type="numeric" default="0" /> <cfset var EntryQuery =
createQuery() /> <cfset EntryQuery.join("Entry",
"User") /> <cfset
EntryQuery.returnObjectFields("User") /> <cfset
EntryQuery.getWhere().isEqual("Entry", "entryId",
arguments.entryId) /> <cfreturn
getByQuery(EntryQuery) /> </cffunction> <cffunction name="getRecentEntries"
access="public" hint="I return a query of recent entries."
output="false" returntype="query"> <cfargument
name="count" hint="I am the number of recent entries to
return" required="yes" type="numeric" /> <cfset var EntryQuery =
createQuery() /> <cfset
EntryQuery.setMaxRows(arguments.count) /> <cfset
EntryQuery.returnField("Entry",
"entryId").returnField("Entry", "title") /> <cfset
EntryQuery.getOrder().setDesc("Entry", "publicationDate")
/> <cfreturn
getByQuery(EntryQuery) /> </cffunction> <cffunction name="getArchives"
access="public" hint="I return a query of months, years and
number of entries." output="false"
returntype="query"> <cfset var archvies = 0 /> <cfquery
name="archives" datasource="#_getConfig().getDsn()#"
cachedwithin="#CreateTimespan(0, 0, 1, 0)#"> SELECT
MONTH(publicationDate) as month, YEAR(publicationDate) as year, count(entryId)
as entryCount FROM Entry GROUP BY
MONTH(publicationDate), YEAR(publicationDate) ORDER BY
YEAR(publicationDate) desc, MONTH(publicationDate) desc </cfquery> <cfreturn archives /> </cffunction> João Fernandes From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Tilley Doug, On 3/31/06, Doug Hughes <[EMAIL PROTECTED]> wrote: What do you have in the file
C:\CFusionMX7\wwwroot\ChrisBlogApp\data\Gateway\EntryGateway.cfc? There
should be an init method in there.
Couple of random questions: Are you on windows? If not, do you have different casings of the file EntryGateway.cfc in the
gateway folder? (It might be a case sensitivity bug.) Doug From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Chris Tilley
Here it is: On 3/31/06, Doug Hughes <[EMAIL PROTECTED]> wrote: This sounds
familiar, but for the life of me I can't remember what this is. Can you send the
actual error? Doug From: [EMAIL PROTECTED]
[mailto:
[EMAIL PROTECTED]] On Behalf Of Chris Tilley Sean, On 3/31/06, Sean Corfield <[EMAIL PROTECTED]> wrote: On 3/30/06, Jeff Lester < [EMAIL PROTECTED]>
wrote:
-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
|
- Re: [Reactor For CF] problem with Blog sa... Chris Tilley
- RE: [Reactor For CF] problem with Bl... Doug Hughes
- Re: [Reactor For CF] problem wit... Chris Tilley
- Re: [Reactor For CF] problem wit... Jeff Lester
- RE: [Reactor For CF] problem wit... Doug Hughes
- Re: [Reactor For CF] problem wit... Chris Tilley
- RE: [Reactor For CF] problem wit... Doug Hughes
- Re: [Reactor For CF] problem wit... Chris Tilley
- RE: [Reactor For CF] problem wit... Doug Hughes
- Re: [Reactor For CF] problem wit... Chris Tilley
- RE: [Reactor For CF] problem with Blog sample app João Fernandes
- Re: [Reactor For CF] problem with Blog sample app Chris Tilley
- RE: [Reactor For CF] problem with Blog sample app João Fernandes

