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

Jul

31

2014
premjith

MY SQL Interview questions

1.What is Sql? Define it? SQL stands for Structured Query Language. SQL is a programming Language designed specially for managing data in RDBMS (Relational Database Management System). 2.Explain RDBMS? A Relational Database Management System is the most widely used database Management System based on the Relational Database model. Logical data models include Hierarchical database model Network model Relational model Entity–relationship model Object model Document model Entity–attribute–value model Star schema We can store […]

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

Oct

23

2013
php

PHP learning 12

Hi friends we are going to next part.please go to the line number 13 of our registration.php page 1 2 3 4 5 6 7 8 9 $details = array( "vchr_name" => $name, "vchr_house" => $house, "vchr_street" => $street, "vchr_city" => $city, "vchr_district" => $dist, "vchr_state" => $state, "vchr_phone" => $phone ); This is an array in php.What is array?. Hope you all know about arrays, even though I’ll give you a […]

read more

Oct

21

2013
php

PHP learning 11

Hi friends it was a long break, Sorry for the delay from my side i was little busy with my personal matters. Here we are going to registration page last day we were discussed about GET,POST etc things today we are beginning with the same line. The first word of that line ‘isset’ isset() is a function in php its is used for checking a variable is set or not. It is […]

read more