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);
    }
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);
    }
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 ) ; }
Adds the category and additional parameters to a query string.

@param string $category
@param string $and

@return string
Adds the category and additional parameters to a query string .