Just realized that you may be looking at a indvidual column.

You can use the len function as in

<cfif NOT len(checkit.error_id)>
    The column is empty
</cfif>

if you are checking the table then recordCount is the ticket
<cfif NOT checkit.recordCount>
    The column is empty
</cfif>

btw, you dont need the ## inside the cfif statement

Duane

  -----Original Message-----
  From: Duane Boudreau [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 15, 2004 10:01 PM
  To: CF-Talk
  Subject: RE: table is empty WAS: Laszlo decision to open source pays a
dividend

  Try

  <cfif NOT checkit.recordCount>

    -----Original Message-----
    From: Phillip Perry [mailto:[EMAIL PROTECTED]
    Sent: Friday, October 15, 2004 9:53 PM
    To: CF-Talk
    Subject: RE: Laszlo decision to open source pays a dividend

    Hi,

    How do i find out if a table is empty? Would it be....

    <cfquery datasource="#mydbname#" name="checkit">
      SELECT *
      FROM error_table
      </cfquery>
      <cfoutput query="checkit">
      <cfif #error_id# IS " "><!---or would that be NULL?--->
      The Table Is Null!
      </cfif>
      </cfoutput>

    or is that wrong?

    Thanks Phil
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to