private function createLogIterationQuery($logTable, $idField, $fields, $conditions, $iterationStep)
    {
        $bind = array();

        $sql = "SELECT " . implode(', ', $fields) . " FROM `" . Common::prefixTable($logTable) . "` WHERE $idField > ?";

        foreach ($conditions as $condition) {
            list($column, $operator, $value) = $condition;

            if (is_array($value)) {
                $sql .= " AND $column IN (" . Common::getSqlStringFieldsArray($value) . ")";

                $bind = array_merge($bind, $value);
            } else {
                $sql .= " AND $column $operator ?";

                $bind[] = $value;
            }
        }

        $sql .= " ORDER BY $idField ASC LIMIT " . (int)$iterationStep;

        return array($sql, $bind);
    }
private function createLogIterationQuery($logTable, $idField, $fields, $conditions, $iterationStep)
    {
        $bind = array();

        $sql = "SELECT " . implode(', ', $fields) . " FROM `" . Common::prefixTable($logTable) . "` WHERE $idField > ?";

        foreach ($conditions as $condition) {
            list($column, $operator, $value) = $condition;

            if (is_array($value)) {
                $sql .= " AND $column IN (" . Common::getSqlStringFieldsArray($value) . ")";

                $bind = array_merge($bind, $value);
            } else {
                $sql .= " AND $column $operator ?";

                $bind[] = $value;
            }
        }

        $sql .= " ORDER BY $idField ASC LIMIT " . (int)$iterationStep;

        return array($sql, $bind);
    }
private function createLogIterationQuery ( $ logTable , $ idField , $ fields , $ conditions , $ iterationStep ) { $ bind = array ( ) ; $ sql = "SELECT " . implode ( ', ' , $ fields ) . " FROM `" . Common :: prefixTable ( $ logTable ) . "` WHERE $idField > ?" ; foreach ( $ conditions as $ condition ) { list ( $ column , $ operator , $ value ) = $ condition ; if ( is_array ( $ value ) ) { $ sql .= " AND $column IN (" . Common :: getSqlStringFieldsArray ( $ value ) . ")" ; $ bind = array_merge ( $ bind , $ value ) ; } else { $ sql .= " AND $column $operator ?" ; $ bind [ ] = $ value ; } } $ sql .= " ORDER BY $idField ASC LIMIT " . ( int ) $ iterationStep ; return array ( $ sql , $ bind ) ; }
mapping for dimensions => segments, and each dimension should automatically have a segment.
mapping for dimensions = > segments and each dimension should automatically have a segment .