CodeIgniter is one of the greatest PHP Framework out there. It’s simple and easy to use. Even a beginner won’t have trouble when learn it. But there is a disadvantage in CodeIgniter. You can’t generate a Model class from your existing database. Sometimes it troubles me. I must write my own Model class everytime i make a new CodeIgniter Application. But someday i think about create my own simple php application to create a Model class that has simple CRUD syntax in CodeIgniter.
Now i want to share it with you guys. It’s only simple apps, but it can save some times for me.
. You can download the source code here. To use this generator, just edit the database configuration and type this code below in command line:
php GenModel.php
and then copy the generated file to your model folder in CodeIgniter. And you can edit it to fulfill your need.
Maybe you like this post too :
[Tutorial] Write and Read Excel Files With CodeIgniter
Recent Top Story :
Recent Search :
Posted in Tutorial | Comments (2)

November 13th, 2009 at 8:24 pm
Bug on line 12:
mysql_select_db($database_name);
should be:
mysql_select_db($db_name);
Reply
baskoro Reply:
November 30th, 2009 at 5:35 pm
thanks for your correction
Reply