Monthly Archives: January 2012

No need (for this redundancy)

I hate this redundancy of this code.  Look at this.

if( $where != “”)
  {
    $where = “WHERE “.$where.”Active = ‘1’”;
  }
else
  {
    $where = “WHERE Active = ‘1’”;
  }

Does this make sense to just anyone?  It only means this:

    $where = “WHERE $where Active = ‘1’”;

Most obviously.

Advertisements