Web Analytics Made Easy -
StatCounter Replace if empty record - CodingForum

Announcement

Collapse
No announcement yet.

Replace if empty record

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace if empty record

    Is this do-able?

    <%
    if shopdynamictitle = "" then ' if nothing is in dynamic
    shopdynamictitle = "myowntitle"
    end if
    %>


    I need to check if dynamic (meta tag) title is empty. If so then insert my own static.
    I know that I know nothing

  • #2
    yes that is do-able.

    Code:
    <%
    
    if shopdynamictitle = "" then 
    
    'if variable is equal to nothing.
    
           shopdynamictitle = "myowntitle"
    else 
    
    'if variable it is NOT equal to nothing.
    
          shopdynamictitle = blahblahblah  
    end if
    
    %>
    Last edited by Baleric; Sep 30, 2006, 02:59 AM.

    Comment


    • #3
      you could do it in the query.

      Here is an example using Access
      Code:
      SELECT IIF(IsNull(doctitle),"No Title",doctitle) as fixedTitle
      FROM table;
      http://www.degs.co.uk
      http://www.computer-helpforum.com

      Comment

      Working...
      X