2012-03-24 Junichi Satoh <junichi@rworks.jp>
* include/db/postgresql.php: Fixed SQL error with PostgreSQL. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5828 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b3bed2432d
commit
e4ac6834b6
|
@ -1,3 +1,7 @@
|
|||
2012-03-24 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* include/db/postgresql.php: Fixed SQL error with PostgreSQL.
|
||||
|
||||
2012-03-24 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* operation/agentes/status_monitor.php: Fixed SQL error with PostgreSQL.
|
||||
|
|
|
@ -57,6 +57,9 @@ function postgresql_connect_db($host = null, $db = null, $user = null, $pass = n
|
|||
* @return mixed Value of first column of the first row. False if there were no row.
|
||||
*/
|
||||
function postgresql_db_get_value ($field, $table, $field_search = 1, $condition = 1, $search_history_db = false) {
|
||||
if ($field_search[0] == '`')
|
||||
$field_search = str_replace ('`', '', $field_search);
|
||||
|
||||
if (is_int ($condition)) {
|
||||
$sql = sprintf ("SELECT %s FROM %s WHERE %s = %d LIMIT 1",
|
||||
$field, $table, $field_search, $condition);
|
||||
|
|
Loading…
Reference in New Issue