CodeIgniter Installation Instructions

Download CodeIgniter CodeIgniter Installation Steps Normal Directory Structure Increase Security For Application Folder Download CodeIgniter Download the codeigniter latest version using the below urls Codeigniter Site Github CodeIgniter Installation Steps 1.Unzip the package. 2.Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root. 3.Open the application/config/config.php file […]

CodeIgniter – Join Query

CodeIgniter Join query function is used to fetch the result from one or more tables. The join types are normal join, inner join, left join and right join. Normal Join Join With Condition Inner Join Left Join Right Join Normal Join $this->db->select(‘tbl_user.username,tbl_user.userid,tbl_usercategory.typee’); $this->db->from(‘tbl_user’); $this->db->join(‘tbl_usercategory’,’tbl_usercategory.usercategoryid=tbl_user.usercategoryid’); $query=$this->db->get(); $data=$query->result_array(); SELECT `tbl_user`.`username`, `tbl_user`.`userid`, `tbl_usercategory`.`type` FROM (`tbl_user`) JOIN `tbl_usercategory` ON […]

CodeIgniter Queries

$this->db->query() Read & Write Query $this->db->simple_query() Set Prefixes For Table Set Dynamic Prefix For Table Protecting identifiers Escaping Queries (Security Practice) Query Bindings $this->db->query() To submit a query, use the following function: $this->db->query(‘YOUR QUERY HERE’); place raw SQL in the query() method $query = $this->db->query(“select * from users”); Pass query in a variable $sql = […]

CodeIgniter – Select Query

CodeIgniter ‘SELECT’ query will execute using following functions. They are $this->db->query() $this->db->query() With Query Bindings $this->db->get() $this->db->get() Select The Fields $this->db->get() With Limit $this->db->get() With Offset,Limit $this->db->get() With select, from $this->db->get() With Where, Or_Where, Where_In, or_where_in, where_not_in $this->db->get_where() $this->db->get() With Like, or_like, not_like, or_not_like $this->db->get() With group_by $this->db->get() With having $this->db->get() With Order BY $this->db->select_max() […]

CodeIgniter – Update Query

CodeIgniter ‘UPDATE’ query will execute using following functions. They are $this->db->update() $this->db->update_string() $this->db->update_batch() $this->db->update() $data = array( ‘name’ = > $_POST[‘name’] , ‘groupname’= > $_POST[‘groupname’], ‘age’ = > $_POST[‘age’] ); $this->db->where(‘id’, $_POST[‘id’]); $this->db->update(‘tbl_user’, $data); $this->db->update_string() Note: Values are automatically escaped, producing safer queries. $data = array( ‘groupname’= >$_POST[‘groupname’] ); $where = “status = ‘user'”; $str […]

http:/www.bsourcecode.com/codeigniter/codeigniter-url-helper/

This helper is loaded using the following code: $this->load->helper(‘url’); URL Helper See the below table, you will get the list of URL helper function of codeigniter with the output url like anchor link, popup window etc URL Helper Function Output URL site_url () http://127.0.0.1/codeigniter/first/index.php site_url (‘blog’) http://127.0.0.1/codeigniter/first/index.php/blog site_url (‘blog/id/123’) http://127.0.0.1/codeigniter/first/index.php/blog/id/123 $segments = array(‘blog’, ‘post’, ‘123’); […]

CodeIgniter URL Security And URL Routes

CodeIgniter URI Security How To Routes CodeIgniter URI Security CodeIgniter is fairly restrictive regarding which characters it allows in your URI strings in order to help minimize the possibility that malicious data can be passed to your application. URIs may only contain the following: Alpha-numeric text Tilde: ~ Period: . Colon: : Underscore: _ Dash: […]

What is CodeIgniter?

Welcome to CodeIgniter Who is CodeIgniter For? CodeIgniter at a Glance CodeIgniter Server And Database Support CodeIgniter Features Application Flow Chart Model-View-Controller Goal Of CodeIgniter Welcome to CodeIgniter CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal to enable you to develop projects much […]

C Interview Questions 61-70

This post contains 61-70 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview. 61-70 Questions Q1: void main() { int i; char a[]=”\0″; if(printf(“%s\n”,a)) printf(“Ok here \n”); else printf(“Forget it\n”); } Answer: Ok here Q2: main() { clrscr(); } clrscr(); Answer: No […]