Welcome Guest, Not a member yet? Register   Sign In
Model library
#11

[eluser]hugle[/eluser]
Looks good to meSmile
thanks everyoneSmile

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

so I thought this:
Code:
$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!
#12

[eluser]wiredesignz[/eluser]
Strictly speaking this is not a model. It is a data object. But good work anyway.
#13

[eluser]Unknown[/eluser]
I have not notice that, it is a good point to recode the data model

regards

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

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

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

Still, looks nice.
#15

[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
http://csotelo.blogspot.com/2009/10/mode...hp-if.html

Please check and test it
regards[/quote]


thank's, it's usefull library for me




Theme © iAndrew 2016 - Forum software by © MyBB