mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
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
205bcf8e0a
commit
4ca1746d1b
@ -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>
|
2012-03-24 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* operation/agentes/status_monitor.php: Fixed SQL error with PostgreSQL.
|
* 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.
|
* @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) {
|
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)) {
|
if (is_int ($condition)) {
|
||||||
$sql = sprintf ("SELECT %s FROM %s WHERE %s = %d LIMIT 1",
|
$sql = sprintf ("SELECT %s FROM %s WHERE %s = %d LIMIT 1",
|
||||||
$field, $table, $field_search, $condition);
|
$field, $table, $field_search, $condition);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user