Long Live Open Source Software !!

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. :)

Blogged with the Flock Browser
Share this post here:
  • Digg
  • del.icio.us
  • Ma.gnolia
  • blinkbits
  • Furl
  • StumbleUpon
  • Facebook
  • Google Bookmarks
  • Technorati

Maybe you like this post too : [Tutorial] Write and Read Excel Files With CodeIgniter

Recent Top Story :

Recent Search :

2 Responses to “[Tutorial] Generate Model Class with CRUD in CodeIgniter and MySql”

  1. jwest Says:

    Bug on line 12:
    mysql_select_db($database_name);

    should be:
    mysql_select_db($db_name);

    Reply

    baskoro Reply:

    thanks for your correction :)

    Reply

Leave a Reply