• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Model library

Looks good to meSmile
thanks everyoneSmile

in the MY_Model there were variables:
var $table = "";
    var $primary_key = "id";

so I thought this:
$this->primary_key = 'book_id';

won't work at all....

and ray73864's approach is something new to me at allSmile))

everyday you learn smth newSmile thank yoU!

Strictly speaking this is not a model. It is a data object. But good work anyway.

I have not notice that, it is a good point to recode the data model


[quote author="waldmeister" date="1254749400"]Wouldn't it be easier to adjust your model slightly? Wink
E.g. by adding another attribute:
class MY_Model extends Model {

    var $table = "";
    var $primary_key = "id";
and using that attribute in your methods instead of 'id'?[/quote]

[eluser]Jamie Rumbelow[/eluser]
*cough* - http://github.com/jamierumbelow/codeigni..._Model.php

Still, looks nice.

[eluser]m4d3 Gun[/eluser]
[quote author="Carlos Eduardo Sotelo Pinto" date="1254735827"]I have made a model library for codeigniter. It is based on the article http://maestric.com/doc/php/codeigniter_models

The code is on my blog

Please check and test it

thank's, it's usefull library for me

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.