summaryrefslogtreecommitdiff
path: root/adodb.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'adodb.inc.php')
-rw-r--r--adodb.inc.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/adodb.inc.php b/adodb.inc.php
index f995eeb0..6726d042 100644
--- a/adodb.inc.php
+++ b/adodb.inc.php
@@ -2665,15 +2665,16 @@ if (!defined('_ADODB_LAYER')) {
}
$sql = "SELECT * FROM $table";
+ if (!empty($where)) {
+ $sql .= " WHERE $where";
+ }
+
$rs = $this->SelectLimit($sql, 1);
if (!$rs) {
return false; // table does not exist
}
$rs->tableName = $table;
- if (!empty($where)) {
- $sql .= " WHERE $where";
- }
$rs->sql = $sql;
switch($mode) {