diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index c138b0e19a..98625fabad 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,11 @@
+2012-03-25  Junichi Satoh  <junichi@rworks.jp>
+
+	* include/db/postgresql.php: Fixed bad syntax for WHERE clause in
+	postgresql_db_format_array_where_clause_sql().
+
+	* include/functions_config.php: Back to previous version, because
+	fixed bad sql in include/db/postgresql.php.
+
 2012-03-24  Junichi Satoh  <junichi@rworks.jp>
 
 	* include/db/postgresql.php: Fixed SQL error with PostgreSQL.
diff --git a/pandora_console/include/db/postgresql.php b/pandora_console/include/db/postgresql.php
index 25c294c801..0027aae38c 100644
--- a/pandora_console/include/db/postgresql.php
+++ b/pandora_console/include/db/postgresql.php
@@ -540,7 +540,7 @@ function postgresql_db_format_array_where_clause_sql ($values, $join = 'AND', $p
 	foreach ($values as $field => $value) {
 		if (is_numeric ($field)) {
 			/* User provide the exact operation to do */
-			$query .= $value;
+			$query .= sprintf ("%s = %d", $field, $value);
 				
 			if ($i < $max) {
 				$query .= ' '.$join.' ';
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index eb37170c13..40b0a619c3 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -677,7 +677,7 @@ function config_check (){
     $now = date("U");
     
     // First action in order to know if it's a new installation or db maintenance never have been executed 
-    $first_action = db_get_value_filter('utimestamp', 'tsesion', array('1' => 'true', 'order' => 'id_sesion ASC'));
+    $first_action = db_get_value_filter('utimestamp', 'tsesion', array('1' => '1', 'order' => 'id_sesion ASC'));
     $fresh_installation = $now - $first_action;
     
     $resta = $now - $db_maintance;