On 29/08/2006, at 2:24 PM, Tim Lucas wrote:

> Just noticed some MySQL 4.1-only queries sneak into Farcry v3 and
> wondering what the official minimum requirements are, as some of our
> production sites now running on FC3 are also running on MySQL 4.0.
>
> It's the queries that use sub-selects that got me (farcry_core/
> packages/types/types.cfc, fRebuildFriendlyURLs).

If anybody is wondering, the fix for the fRebuildFriendlyURLs is  
below. It replaces the last two queries containing sub-selects:

                <cfquery name="stLocal.qRefObjectIds" 
datasource="#application.dsn#">
                        SELECT objectid FROM #application.dbowner#refObjects
                </cfquery>

                <cfif stLocal.qRefObjectIds.recordCount>
                        <!--- clean out any friendly url for objects that have 
been  
deleted --->
                        <cfquery name="stLocal.qDelete" 
datasource="#application.dsn#">
                        DELETE
                        FROM    #application.dbowner#reffriendlyURL
                        WHERE   refobjectid NOT IN (#quotedValueList 
(stLocal.qRefObjectIds.objectid)#)
                        </cfquery>
                </cfif>

                <cfquery name="stLocal.typeObjectIds" 
datasource="#application.dsn#">
                        SELECT objectid FROM 
#application.dbowner##arguments.typeName#
                </cfquery>

                <cfif stLocal.typeObjectIds.recordCount>
                        <!--- delete old friendly url for this type --->
                        <cfquery name="stLocal.qDelete" 
datasource="#application.dsn#">
                        DELETE
                        FROM    #application.dbowner#reffriendlyURL
                        WHERE   refobjectid IN (#quotedValueList 
(stLocal.typeObjectIds.objectid)#)
                        </cfquery>
                </cfif>

-- tim


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to