House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

<cfqueryparam> question ("null" attribute)

Author:
Dave Watts
02/19/2004 02:48 PM

> I'm not quite sure how the null attribute works in <cfqueryparam> > > =========================== > From the docs: > null [Optional] [Default="No"] > Description: Whether parameter is passed as a null value. >  *Yes: tag ignores the value attribute >  *No > =========================== > > Can anyone give me an example of the "null" attribute put to good > use? Since CF and HTML don't have an idea of NULL, you may want to convert an empty string from an HTML form into a NULL value within the database. You could do it like this, I think: <cfqueryparam ... null="#YesNoFormat(NOT Len(Trim(Form.fieldname)))#"> Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444


Search cf-talk

May 23, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference