<commit_before><?php
class Articles_model extends CI_Model
{
	public function __construct()
	{
		$this->load->database();
	}

	public function view()

	{
		

		if($this->input->post('tag1'))
			$tag1=$this->input->post('tag1');
		if($this->input->post('tag2'))
			$tag2=$this->input->post('tag2');
		if($this->input->post('tag3'))
			$tag3=$this->input->post('tag3');
		if($this->input->post('tag4'))
			$tag4=$this->input->post('tag4');
		if($this->input->post('tag5'))
			$tag5=$this->input->post('tag5');

		if(!$this->input->post('tag1') && !$this->input->post('tag2') && !$this->input->post('tag3') && !$this->input->post('tag4') && !$this->input->post('tag5')){
 			
 			$query_str = "SELECT articles.id,tp.name, `title`,LEFT(content,150), `Upvotes`,`Downvotes`,user_lawyer.username,user_lawyer.pic_link FROM `articles` JOIN `user_lawyer` ON articles.user_id=user_lawyer.id  LEFT JOIN `tag_rel` AS tr ON articles.id = tr.article_id LEFT JOIN `topics` AS tp ON tr.topic_id = tp.id 
  GROUP BY articles.id";<commit_msg>lawyer_filter ajax to be done<commit_after><?php
class Articles_model extends CI_Model
{
	public function __construct()
	{
		$this->load->database();
	}

	public function view()

	{
		

		/*if($this->input->post('tag1'))
			$tag1=$this->input->post('tag1');
		if($this->input->post('tag2'))
			$tag2=$this->input->post('tag2');
		if($this->input->post('tag3'))
			$tag3=$this->input->post('tag3');
		if($this->input->post('tag4'))
			$tag4=$this->input->post('tag4');
		if($this->input->post('tag5'))
			$tag5=$this->input->post('tag5');*/
		$data = explode(',',$this->input->post(tag));

		if(!$this->input->post('tag1') && !$this->input->post('tag2') && !$this->input->post('tag3') && !$this->input->post('tag4') && !$this->input->post('tag5')){
 			
 			$query_str = "SELECT articles.id,tp.name, `title`,LEFT(content,150), `Upvotes`,`Downvotes`,user_lawyer.username,user_lawyer.pic_link FROM `articles` JOIN `user_lawyer` ON articles.user_id=user_lawyer.id  LEFT JOIN `tag_rel` AS tr ON articles.id = tr.article_id LEFT JOIN `topics` AS tp ON tr.topic_id = tp.id 
  GROUP BY articles.id";
{'fraction_non_alphanumeric': 0.23651844843897823, 'fraction_numerical': 0.021759697256385997, 'mean_word_length': 5.184210526315789, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '508618', 'n_tokens_mistral': 870, 'n_tokens_neox': 789, 'n_words': 119}