Model Functions - Same Code - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Model Functions - Same Code (/showthread.php?tid=9397) |
Model Functions - Same Code - El Forum - 06-24-2008 [eluser]Yash[/eluser] Code: class Usersmodel extends Model { How can we do this? Model Functions - Same Code - El Forum - 06-24-2008 [eluser]Yash[/eluser] Suppose I need to generate random numbers and I want to use this code in each model function how I can do this. writing code again and again is not a good idea any ideas? sorry for bump Model Functions - Same Code - El Forum - 06-24-2008 [eluser]Sam Dark[/eluser] MY_Model.php Code: <?php Code: class Post extends BaseModel { Model Functions - Same Code - El Forum - 06-24-2008 [eluser]Sam Dark[/eluser] Also you can use helper / library / plugin for this purpose. Model Functions - Same Code - El Forum - 06-24-2008 [eluser]Yash[/eluser] Nope..I want to use different functions in same model..and don't want to use $this I mean don't want to load that model itself. Model Functions - Same Code - El Forum - 06-24-2008 [eluser]Sam Dark[/eluser] Code: class Post extends Model { Model Functions - Same Code - El Forum - 06-24-2008 [eluser]Yash[/eluser] SuperBBB..thank you man it works like a magic |