CodeIgniter

Using ActiveRecord Library Separately from CodeIgniter

CodeIgniters ActiveRecord library is a nice implementation (though modified) of ActiveRecord design pattern. It comes bundled with CodeIgniter. So if you want to use Just this library in your application individually instead of using full CodeIgniter framework, what to do? Today I’ve spent some time and separate the ActiveRecord library from CodeIgniter. Now you can …

Using ActiveRecord Library Separately from CodeIgniter Read More »

Prelude to foundation: Its time to go for a better PHP Framework

I remember those old days when I had to write everything by myself. I wrote huge libraries to work with MySQL. Then I learned PostgreSQL and SQLite but didn’t rewrote my old library to work with those, I was running short of time. So I forsake the opportunity to write a db library which works …

Prelude to foundation: Its time to go for a better PHP Framework Read More »

Vulnerable bug in CodeIgniter which took us hours to fix our corrupted database

We use codeigniter internally to develop our web solutions in somewhere in… net limited. Day before yesterday we suffered a terrible situation for an internal bug in code igniter which corrupted data inside some tables of our application database and then it tooks hours to find the origin of that bug, to fix it and …

Vulnerable bug in CodeIgniter which took us hours to fix our corrupted database Read More »

Igniting Code with Code Igniter

Day by day I am loving codeigniter more and more. Its so awesome, rick ellis, you are da man. But unfortunately codeigniter was not properly tested with PostgreSQL. Yesterday I fixed active records insert_id() function to work properly with PostgreSQL. I am running it’s version 8.1 Here comes my modified system/database/driver/postgre/postgre_driver.php function insert_id() { $v …

Igniting Code with Code Igniter Read More »

Fixing ActiveRecord Class for CodeIgniter to use with PostgreSQL

Hi, If you are using PostgreSQL and execute the following statement, it will defnitely generate error because of some internal properties in the model. Controller Code <?$model = $this->load->model(“MyModel”);$this->mymodel->insert();?> where the model code is <?Class MyModel extends Model{  public $username;  public $password;   public function insert()  {    $this->db->insert(“table”,$this);  }}?> So guys – Here I fix the Active Record class in CodeIGniter. …

Fixing ActiveRecord Class for CodeIgniter to use with PostgreSQL Read More »

Adding Layout support like RubyOnRails into CodeIgniter :: By Hooking

Recently I came across an interesting feature in RoR which is known as layout yielding. To understand what it is just imagine that you have a particular template file (layout) specific to your controller, and in that layout file you have a special block called yield. After that whenever there is some output from any …

Adding Layout support like RubyOnRails into CodeIgniter :: By Hooking Read More »