Sorry for the long delay in a response. I had waited a day and when no one answered I went in and modified my code to get around variable override.

So, today I went back and reversed my changes and sure enough, adding var infront of the offending items stopped them from being overridden.

Thanks for the tip, I can not believe in all of this time I have been working CFM I never encountered it. Or maybe I did and never recognized the problem.

On 8/5/2016 7:41 AM, nitish pandey wrote:
Did it work @Ernest?

2016-08-03 8:38 GMT+05:30 nitish pandey <[email protected] <mailto:[email protected]>>:

    In both the functions add this before the resurrections cfquery
    tags (or scripts)-
    Var AMA ;

    If you want to share that query result across functions then
    either use a different name or pass it as an argument.

    You'll be on your way (to the next challenge ).

    np

    On 02-Aug-2016 11:42 PM, "Ernest McCloskey"
    <[email protected]
    <mailto:[email protected]>> wrote:

        Perhaps I never noticed it before, or maybe my projects have
        been small enough that I never over used variables.  Here is
        my issue,

        I am using CFAJAX to call a cffunction in what i term
        inventory.cfc.  Within that cffunction, I use cfinvoke to call
        another function called getBreakEven (it is within the same cfc).

        In my base function (getListings) I set my structure up
        <cfset st = structnew() />
        and I do a cfquery named "ama".

        In my getBreakEven function, I did the same.
        <cfset st = structnew() />
        and I do a cfquery named "ama"

And perform different functions on the getBreakEven data. When the structure is returned, all my previous data is
        wiped.  I have no query "ama" and the "st" is populated with
        the data from getBreakEven.

        Is this normal?  I am just expanding into multiple cffunctions
        in my programming and I cannot believe I never come across
        this before.

-- -- online documentation: http://openbd.org/manual/
        http://groups.google.com/group/openbd?hl=en
        <http://groups.google.com/group/openbd?hl=en>

        --- You received this message because you are subscribed to
        the Google Groups "Open BlueDragon" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected]
        <mailto:openbd%[email protected]>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.




--
-Nitish
"Imagination is more powerful than Knowledge"
--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.


--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

--- You received this message because you are subscribed to the Google Groups "Open BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to