From 7faa9098ab07652c1d93cf711e2d303f46c71eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Orme=C3=B1o?= Date: Tue, 30 Aug 2016 11:10:54 -0300 Subject: [PATCH] fix ambiguous id --- libraries/Datatable.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/Datatable.php b/libraries/Datatable.php index d7f2363..8a47062 100644 --- a/libraries/Datatable.php +++ b/libraries/Datatable.php @@ -190,7 +190,8 @@ public function datatableJson($formats = array(), $debug = FALSE) $selectArray[] = $c['data']; } if ($this->rowIdCol !== NULL && in_array($this->rowIdCol, $selectArray) === FALSE) { - $selectArray[] = $this->rowIdCol; + $tableName = explode('.',$selectArray[0])[0]; + $selectArray[] = "{$tableName}.{$this->rowIdCol}"; } //put the select string together @@ -457,4 +458,4 @@ public function whereClauseArray(); } // END Datatable Class -/* End of file Datatable.php */ \ No newline at end of file +/* End of file Datatable.php */