original_string: private function where($category, $and = '')
      {
          if (!empty($category)) {
              $sql = array();
              foreach ((array) $category as $like) {
                  $sql[] = "c.category LIKE '{$like}%'";
              }
              $category = 'AND '.implode(' OR ', $sql);
          }
  
          return trim('INNER JOIN sitemap AS m INNER JOIN categories AS c WHERE s.docid = m.docid AND m.category_id = c.id '.$category.' '.$and);
      }
code: private function where($category, $and = '')
      {
          if (!empty($category)) {
              $sql = array();
              foreach ((array) $category as $like) {
                  $sql[] = "c.category LIKE '{$like}%'";
              }
              $category = 'AND '.implode(' OR ', $sql);
          }
  
          return trim('INNER JOIN sitemap AS m INNER JOIN categories AS c WHERE s.docid = m.docid AND m.category_id = c.id '.$category.' '.$and);
      }
code_tokens: private function where ( $ category , $ and = '' ) { if ( ! empty ( $ category ) ) { $ sql = array ( ) ; foreach ( ( array ) $ category as $ like ) { $ sql [ ] = "c.category LIKE '{$like}%'" ; } $ category = 'AND ' . implode ( ' OR ' , $ sql ) ; } return trim ( 'INNER JOIN sitemap AS m INNER JOIN categories AS c WHERE s.docid = m.docid AND m.category_id = c.id ' . $ category . ' ' . $ and ) ; }
docstring: Adds the category and additional parameters to a query string.
  
  @param string $category
  @param string $and
  
  @return string
docstring_tokens: Adds the category and additional parameters to a query string .