Posts Tagged ‘codeigniter’


Mar

19

2016
Long or brief words written on white board

split string by words and limit string to number of words in codeigniter and core php

We can do this with the help of text helper in codeigniter This helper is loaded using the following code: $this->load->helper(‘text’); 1 2 3 4 5 6   $string = "I’m Premjith.K.K. Working as software engineer in sesame technologies pvt ltd calicut,Kerala,India. I have good knowledge and skills in PHP and its frame works such as Codeigniter, Wordpress, Cakephp etc and also have knowledge in c#.net. Using these skills I can convert […]

read more

Dec

5

2013
premjith

simple search in codeigniter

Write this code in your model and call it from your controller 1 2 3 4 5 6 7 8 9 10 11 12 13 14 function search($limit = 10, $offset = 0){ //fields in data base $searchFields = array(‘title’, ‘keywords’); //posted values from the form $sector = $this->input->post(‘sector’); $keyword = $this->input->post(‘keywords’);   //loop generating main search query foreach ($searchFields as $field) { $this->db->or_like($field, $keyword); } $this->db->where(‘status’, ‘A’); return $this->db->get(‘jobs’, $limit, $offset); […]

read more