Simple model question - 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: Simple model question (/showthread.php?tid=31122) |
Simple model question - El Forum - 06-07-2010 [eluser]DADE[/eluser] Hey there, I have a problem with model. I'm new in CI, so can you please answer more detailed. OK so: I need drag from MySQL table random rows. And I want to create Model like: Code: $this->myModel->drag_user(user id here); I need something like: 1. I load my model with ID 3. Code: $this->myModel->drag_user(3); 2. And now he loads user with ID 3 for me. Code: function drag_user(3) { How I can realize this? P.S: Sorry for bad english. Simple model question - El Forum - 06-07-2010 [eluser]MaartenDeGroote[/eluser] So what exactly is your question? Simple model question - El Forum - 06-07-2010 [eluser]DADE[/eluser] How I can make model work when I write Code: ...->drag_user(3) Simple model question - El Forum - 06-07-2010 [eluser]MaartenDeGroote[/eluser] Do you mean this? Code: function drag_user($id) Simple model question - El Forum - 06-07-2010 [eluser]DADE[/eluser] Yeap, thank you. |