From 325d8493323f84f57ec47b0355830a7e8f91afb2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 8 Jul 2006 00:38:06 +0000 Subject: [PATCH] allow to use columns, which are not unique, for read --- etemplate/inc/class.so_sql.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index b67db83b6d..b4f34fbe7a 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -279,6 +279,16 @@ class so_sql } } } + if (!$query) // no unique key in keys, lets try everything else + { + foreach($this->db_data_cols as $db_col => $col) + { + if ($this->data[$col] != '') + { + $query[$db_col] = $this->data[$col]; + } + } + } if (!$query) // keys has no cols { $this->db2data();