method not found error

Discussion in 'Programming' started by chuck1rar, Sep 20, 2012.

  1. #1
    Cant work out why I am getting this error
    The method getLatestThreads was not found in component forum.cfc.
    Calling it from rss.cfm
    <cfset data = application.forum.getLatestThreads(forumid=url.forumid)>

    <cffunction name="getLatestThreads" access="public" returnType="query" output="false"
    hint="Retrieve the last 20 posts to any threads in forums in this forum.">
    <cfargument name="forumid" type="uuid" required="true">
    <cfset var qLatestThreads = "">

    <cfquery name="qLatestThreads" datasource="#variables.dsn#">
    <cfif variables.dbtype is "oracle">
    select * from (
    </cfif>
    select
    <cfif not listFindNoCase("mysql,oracle",variables.dbtype)>
    top 20
    </cfif>
    #variables.tableprefix#messages.title, #variables.tableprefix#threads.name as thread,
    #variables.tableprefix#messages.posted, #variables.tableprefix#users.username,
    #variables.tableprefix#messages.threadidfk as threadid,
    #variables.tableprefix#messages.body,
    #variables.tableprefix#threads.forumidfk,
    #variables.tableprefix#forums.conferenceidfk
    from #variables.tableprefix#messages, #variables.tableprefix#threads, #variables.tableprefix#users, #variables.tableprefix#forums
    where #variables.tableprefix#messages.threadidfk = #variables.tableprefix#threads.id
    and #variables.tableprefix#messages.useridfk = #variables.tableprefix#users.id
    and #variables.tableprefix#threads.forumidfk = <cfqueryparam value="#arguments.forumid#" cfsqltype="CF_SQL_VARCHAR" maxlength="35">
    and #variables.tableprefix#forums.conferenceidfk = #variables.tableprefix#conferences.id
    order by #variables.tableprefix#messages.posted desc
    <cfif variables.dbtype is "mysql">
    limit 20
    <cfelseif variables.dbtype is "oracle">
    ) where rownum <= 20
    </cfif>
    </cfquery>

    <cfreturn qLatestThreads>
    </cffunction>
     
    chuck1rar, Sep 20, 2012 IP