Welcome Guest, Not a member yet? Register   Sign In
[Solved] Active Records DB Model
#2

(This post was last modified: 03-16-2015, 07:47 AM by CroNiX.)

The problem would be addressed in the view, where you are using the data, not in the model.

it would be something like:
PHP Code:
<?php if(count($data)): //check to see if there ARE users returned ?>
<?foreach($data as $d): //yes, list them ?>
<div><?=$d['name']; ?></div>
<?php endforeach; ?>
<?php 
else: //no, display message ?>
<p>Sorry, no users matching criteria.</p>
<?php endif; ?>
Reply


Messages In This Thread
RE: Active Records DB Model - by CroNiX - 03-16-2015, 07:46 AM
RE: Active Records DB Model - by wolfgang1983 - 03-16-2015, 04:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB