Browse Source

Small bug fix to tripal_core_chado_select

Lacey Sanderson 12 years ago
parent
commit
87eb2abd14
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tripal_core/api/tripal_core.api.inc

+ 2 - 2
tripal_core/api/tripal_core.api.inc

@@ -1172,7 +1172,7 @@ function tripal_core_chado_select($table, $columns, $values, $options = NULL) {
   if (!is_array($values)) {
     watchdog('tripal_core', 'Cannot pass non array as values for selecting.', array(),
       WATCHDOG_ERROR);
-    //return FALSE;
+      return FALSE;
   }
 
   if (!is_array($columns)) {
@@ -1423,7 +1423,7 @@ function tripal_core_chado_select($table, $columns, $values, $options = NULL) {
     $sql .= "FROM {$table} ";
 
     // if $values is empty then we want all results so no where clause
-    if (empty($values)) {
+    if (!empty($values)) {
       $sql .= "WHERE ";
     }
     $psql = $sql;  // prepared SQL statement;