tbrehm
2012-01-12 bb0c7702e7f2698aa73c94c891e74ef7d97e5e97
Allow subqueries of strings in remote API.
1 files modified
6 ■■■■ changed files
interface/lib/classes/remoting_lib.inc.php 6 ●●●● patch | view | raw | blame | history
interface/lib/classes/remoting_lib.inc.php
@@ -645,7 +645,11 @@
                foreach($primary_id as $key => $val) {
                    $key = $app->db->quote($key);
                    $val = $app->db->quote($val);
                    $sql_where .= "$key = '$val' AND ";
                    if(strpos($val,'%')) {
                        $sql_where .= "$key like '$val' AND ";
                    } else {
                        $sql_where .= "$key = '$val' AND ";
                    }
                }
                $sql_where = substr($sql_where,0,-5);
                $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$sql_where;