Permalink
Browse files

Respect $where in $row->$table($where)

  • Loading branch information...
1 parent 32d6f19 commit ef4ae8a8e5dbcfb44cff43fb5b2a763cb531a80b @vrana committed Jul 28, 2010
Showing with 4 additions and 2 deletions.
  1. +3 −0 NotORM/Row.php
  2. +1 −2 tests/4-findone.phpt
View
@@ -59,6 +59,9 @@ function __call($name, array $args) {
$column = $this->result->notORM->structure->getReferencingColumn($table, $this->result->table);
$return = new NotORM_MultiResult($table, $this->result, $column, $this[$this->result->primary]);
$return->where($column, array_keys($this->result->rows));
+ if ($args) {
+ call_user_func_array(array($return, 'where'), $args);
+ }
return $return;
}
View
@@ -5,10 +5,9 @@ Find one item by URL
include_once dirname(__FILE__) . "/connect.inc.php";
$application = $software->application("title", "Adminer")->fetch();
-foreach ($application->application_tag() as $application_tag) {
+foreach ($application->application_tag("tag_id", 21) as $application_tag) {
echo $application_tag->tag["name"] . "\n";
}
?>
--EXPECTF--
PHP
-MySQL

0 comments on commit ef4ae8a

Please sign in to comment.