plugin/exo/Installation/Updater/Updater060200.php
private function migratePicture()
    {
        $this->log('UPDATE Picture ...');

        $this->connection->exec('
            INSERT INTO ujm_picture (id, user_id, `label`, url, type, width, height)
            SELECT id, user_id, `label`, url, type, width, height
            FROM ujm_picture_temp
        ');

        $this->log('UPDATE interaction_graphic -> picture_id ...');
        $query = 'SELECT * FROM ujm_interaction_graphic_temp';
        $results = $this->connection->query($query)->fetchAll();
        $stmt = $this->connection->prepare('
            UPDATE ujm_interaction_graphic
            SET picture_id = :docId
            WHERE id = :resId
        ');

        foreach ($results as $res) {
            $stmt->bindValue('docId', $res['document_id']);
            $stmt->bindValue('resId', $res['id']);
            $stmt->execute();
        }
    }
private function migratePicture()
    {
        $this->log('UPDATE Picture ...');

        $this->connection->exec('
            INSERT INTO ujm_picture (id, user_id, `label`, url, type, width, height)
            SELECT id, user_id, `label`, url, type, width, height
            FROM ujm_picture_temp
        ');

        $this->log('UPDATE interaction_graphic -> picture_id ...');
        $query = 'SELECT * FROM ujm_interaction_graphic_temp';
        $results = $this->connection->query($query)->fetchAll();
        $stmt = $this->connection->prepare('
            UPDATE ujm_interaction_graphic
            SET picture_id = :docId
            WHERE id = :resId
        ');

        foreach ($results as $res) {
            $stmt->bindValue('docId', $res['document_id']);
            $stmt->bindValue('resId', $res['id']);
            $stmt->execute();
        }
    }
private function migratePicture ( ) { $ this -> log ( 'UPDATE Picture ...' ) ; $ this -> connection -> exec ( '
            INSERT INTO ujm_picture (id, user_id, `label`, url, type, width, height)
            SELECT id, user_id, `label`, url, type, width, height
            FROM ujm_picture_temp
        ' ) ; $ this -> log ( 'UPDATE interaction_graphic -> picture_id ...' ) ; $ query = 'SELECT * FROM ujm_interaction_graphic_temp' ; $ results = $ this -> connection -> query ( $ query ) -> fetchAll ( ) ; $ stmt = $ this -> connection -> prepare ( '
            UPDATE ujm_interaction_graphic
            SET picture_id = :docId
            WHERE id = :resId
        ' ) ; foreach ( $ results as $ res ) { $ stmt -> bindValue ( 'docId' , $ res [ 'document_id' ] ) ; $ stmt -> bindValue ( 'resId' , $ res [ 'id' ] ) ; $ stmt -> execute ( ) ; } }
Move data picture_temp in picture.
Move data picture_temp in picture .