|
@@ -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;
|