Added message when no result set is found

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5187 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
chartjes 2007-05-25 21:45:39 +00:00
parent aef4b1b21b
commit 06e728eebb

View file

@ -101,6 +101,7 @@ class ConsoleShell extends Shell {
$consoleCommand = '$data = $this->' . $command . ";";
eval($consoleCommand);
if (is_array($data)) {
foreach ($data as $idx => $results) {
if (is_numeric($idx)) { // findAll() output
foreach ($results as $modelName => $result) {
@ -134,6 +135,9 @@ class ConsoleShell extends Shell {
}
}
}
} else {
$this->out("\nNo result set found");
}
}
}
break;