From d74cfc2b6ee54ee871a368f549bfe7de75a89948 Mon Sep 17 00:00:00 2001 From: Maurits van der Schee Date: Tue, 9 Feb 2016 20:55:43 +0100 Subject: [PATCH] Update api.php Fix issue #21 --- api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.php b/api.php index 555b96f..c5e7fe2 100644 --- a/api.php +++ b/api.php @@ -731,7 +731,7 @@ class REST_CRUD_API { protected function findRelations($tables,$database,$db) { $collect = array(); $select = array(); - if (count($tables)>1) { + while (count($tables)>1) { $table0 = array_shift($tables); $result = $this->query($db,$this->queries['reflect_belongs_to'],array($table0,$tables,$database,$database));