function get_trigger_count_bool($focus, $target_count_array) { $count_value = get_trigger_count($focus, $target_count_array); $translated_operator = translate_operator($target_count_array['base']['operator']); //is this a new record? if ($focus->fetched_row['id'] == "") { $count_value = $count_value + 1; } //echo $count_value ."".$translated_operator."".$target_count_array['base']['rhs_value']; return compare_values_number($count_value, $translated_operator, $target_count_array['base']['rhs_value']); //end function get_trigger_count }
function build_filter_where($table_name, $where, $filter_array) { if ($where != "") { $where .= " AND "; } //field $where .= $table_name . "." . $filter_array['lhs_field'] . " "; //operator $where .= translate_operator($filter_array['operator'], "sql"); //value $where .= "'" . $filter_array['rhs_value'] . "'"; return $where; //end function build_filter_where }