mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
aef4b1b21b
commit
06e728eebb
1 changed files with 24 additions and 20 deletions
|
@ -101,6 +101,7 @@ class ConsoleShell extends Shell {
|
||||||
$consoleCommand = '$data = $this->' . $command . ";";
|
$consoleCommand = '$data = $this->' . $command . ";";
|
||||||
eval($consoleCommand);
|
eval($consoleCommand);
|
||||||
|
|
||||||
|
if (is_array($data)) {
|
||||||
foreach ($data as $idx => $results) {
|
foreach ($data as $idx => $results) {
|
||||||
if (is_numeric($idx)) { // findAll() output
|
if (is_numeric($idx)) { // findAll() output
|
||||||
foreach ($results as $modelName => $result) {
|
foreach ($results as $modelName => $result) {
|
||||||
|
@ -134,6 +135,9 @@ class ConsoleShell extends Shell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->out("\nNo result set found");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue