2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the function "api_get_policies". Thanks Cucumber. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9495 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8710d7713c
commit
bb7346eb47
|
@ -1,3 +1,8 @@
|
|||
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_api.php: fixed the function "api_get_policies".
|
||||
Thanks Cucumber.
|
||||
|
||||
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_api.php: fixed the function
|
||||
|
|
|
@ -1167,14 +1167,14 @@ function api_get_policies($thrash1, $thrash2, $other, $thrash3) {
|
|||
$where = '';
|
||||
|
||||
if ($other['data'][0] != "") {
|
||||
$where .= ' AND id_agent = ' . $other['data'][0];
|
||||
$where .= ' AND pol_agents.id_agent = ' . $other['data'][0];
|
||||
|
||||
$sql = sprintf("SELECT policy.id, name, id_agent
|
||||
FROM tpolicies policy, tpolicy_agents pol_agents
|
||||
WHERE policy.id = pol_agents.id %s", $where);
|
||||
FROM tpolicies AS policy, tpolicy_agents AS pol_agents
|
||||
WHERE policy.id = pol_agents.id_policy %s", $where);
|
||||
}
|
||||
else {
|
||||
$sql = "SELECT id, name FROM tpolicies policy";
|
||||
$sql = "SELECT id, name FROM tpolicies AS policy";
|
||||
}
|
||||
|
||||
$policies = db_get_all_rows_sql($sql);
|
||||
|
|
Loading…
Reference in New Issue