Welcome Guest, Not a member yet? Register   Sign In
Starting with CodeIgniter setup: suggestions & best practices

[eluser]pisio[/eluser]
[quote author="Aken" date="1354062391"]CI's active record isn't an ORM. Setters and getters aren't helpful in its case. (Also, __call() is meant for methods, not properties.)

There's no set date for 3.0's release.[/quote]
Code:
class   User_model  extends  CI_Model{
//  construct //
    public function getUsers($params)
{
// $params = array('username','email','website'); //  is stupid to  ask for  md5[password] :)
      $this->data->getUsers =  $this->db->select($params)->get('users')->result();
}
Code:
class User  extends CI_Controller {
//  construct //
   function  listAllUsers()
{
     $this->user_model->getUsers(array('username','email','website','last_active'));
    
$this->load->view('/site/header');
$this->load->view('/site/body/listingUsers');
$this->load->view('site/footer');

}
}
Code:
<?php
//ListingUsers  html
foreach($this->data->getUsers  as $users)
{
print_r($users);

}

?>

That was my idea. I wanted to show you . Smile And tnx... I dont know why i write __call instead __set. Just my bad Smile

[eluser]Dandy_andy[/eluser]
Excellent post thanks. I've been using Codeigniter since May 2012 and it's amazing how much you learn so quickly, but also how much there is still to learn from others.

[eluser]Unknown[/eluser]
Hey Jelmer,
Just found out that dhorrigan has change of identity and now calls himself dandoescode. HIs github page has changed and the uh-oh link is a 404 now.

Please update

[eluser]p5systems[/eluser]
Hi,

Your post is very good for CI beginners .

Can you please explain which ORM library is good for CI ?

Thanks

[eluser]sandeepkhokher[/eluser]
Thanks Smile, It was really good..

[eluser]Mudasir Nazir[/eluser]
Thank you jelmer
thank you for mking this easy for us.

[eluser]Sudz[/eluser]
http://phpcircle.net/content/coding-stan...-practices

[eluser]Unknown[/eluser]
=)

[eluser]Unknown[/eluser]
That’s a really good post, thank!
CodeIgniter = compact + powerful
web The first of me [url="http://giasumoi.vn/home"]http://giasumoi.vn[/url]
I was so happy choice of programming CodeIgniter 2 years ago.

[eluser]Unknown[/eluser]
Nice post! I'm new to CodeIgniter and trying to know more about this framework. Thanks for your grate post!




Theme © iAndrew 2016 - Forum software by © MyBB