Yeah, that query needs to be done something like this:

      <cfquery name="list_items" dbtype="query">
      SELECT          catID,category,parent_id
      FROM            categories
      WHERE           <cfif parentID eq "">parent_id is null <cfelse>
parent_id="#parentid#"</cfif>
      </cfquery>

again, this has not been tested....

On 9/28/06, Ian Skinner <[EMAIL PROTECTED]> wrote:
> parent_id = NULL
>
> I am not sure about QofQ's but in other DBMS I work with you are not allowed 
> to use the equal [=] with a NULL.  I would write that as parent_id IS NULL in 
> my oracle queries.
>
> Again I'm not sure if this applies to a CF QofQ.
>
>
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
>
> ---------
> | 1 |   |
> ---------  Binary Soduko
> |   |   |
> ---------
>
> "C code. C code run. Run code run. Please!"
> - Cynthia Dunning
>
> Confidentiality Notice:  This message including any
> attachments is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the
> intended recipient, please contact the sender and
> delete any copies of this message.
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254670
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
  • Re: Arghhhh!! Zaphod Beeblebrox

Reply via email to