Looking for a VERY simple example of Member DB access

Permalink
My area of interest is Database administration in MySQL and SQLServer using PHP and Delphi. With that background, I would like to get my feet wet by writing a Block that just retrieves and displays a list of Members. With that as a starting point, I am certain that I can expand into other DB oriented areas.

Is there some SIMPLE Block that I can dissect and use as the beginning of my "spiral learning approach"?

With appreciation...

Todd

rtcary
 
A3020 replied on at Permalink Reply
A3020
Just create a test block (look up a tutorial, e.g.http://www.concrete5.org/documentation/how-tos/developers/understan... and then put this in the view.php:

Loader::model('user_list');
$list = new UserList();
$users = $list->get(20);
foreach($users as $user){
  var_dump($user);
}


You can also put the code in the controller.php and set the "$users" array to make it accessible from the view.php: $this->set('users', $users);
rtcary replied on at Permalink Reply
rtcary
Thank you...exactly what I need. I would assume there is a list/documentation that provides other available classes...other than the UserList() class...and the Properties and Methods for the classes. Correct?

With appreciation...

Todd
A3020 replied on at Permalink Reply
A3020