/**
 * Builds the where clause
 *
 * @access   private
 * @static
 *
 * @param    Mixed       $where
 * @param    Boolean     $smartQuotes
 *
 * @returns  String
 */
 function _where($where, $smartQuotes = true, $separator = ',')
 {
     if (is_array($where)) {
         $vals = '';
         foreach ($where as $key => $val) {
             if ($smartQuotes) {
                 if (is_int($val)) {
                     $vals .= "{$key}={$val}{$separator} ";
                 } else {
                     $vals .= "{$key}='{$val}'{$separator} ";
                 }
             } else {
                 $vals .= "{$key}={$val}{$separator} ";
             }
         }
         $len = (strlen($separator) + 1) * -1;
         $vals = substr($vals, 0, $len);
         return 'WHERE ' . $vals;
     } else {
         if ($where != '') {
             return 'WHERE ' . QueryHelper::_getCommaSep($where);
         }
     }
 }
 /**
 * Builds the where clause
 *
 * @access   private
 * @static
 *
 * @param    Mixed       $where
 * @param    Boolean     $smartQuotes
 *
 * @returns  String
 */
 function _where($where, $smartQuotes = true)
 {
     if (is_array($where)) {
         $vals = '';
         foreach ($where as $key => $val) {
             if ($smartQuotes) {
                 if (is_int($val)) {
                     $vals .= "{$key}={$val}, ";
                 } else {
                     $vals .= "{$key}='{$val}', ";
                 }
             } else {
                 $vals .= "{$key}={$val}, ";
             }
         }
         $vals = substr($vals, 0, -2);
         return 'WHERE ' . $vals;
     } else {
         if ($where != '') {
             return 'WHERE ' . QueryHelper::_getCommaSep($where);
         }
     }
 }