mysql - Repeat Until Loop not working -


i trying move data 1 table using repeat loop (one record of table1 3 records in table2). codee in phpmyadmin follows:

delimiter $  drop procedure if exists dowhile$ create procedure dowhile()  begin     declare int;    set = 50001;     repeat        insert table1 ( question_id, options, answer )       select      table 2.question_id,                   table2.falsch1,                   table2.richtig              table2             table2.question_id = i;        select      table 2.question_id,                   table2.falsch2,                   table2.richtig              table2             table2.question_id = i;        select      table 2.question_id,                   table2.falsch3,                   table2.richtig              table2             table2.question_id = i;         set = +1;        until = 50100     end repeat;  end 

when use select statements replacing i fixed number works fine, somehow variable i not working in statement. few records , change fixed number, talking 25k records....

i trying echo / print content of i somehow within phpmyadmin, not work, can't doublecheck real value is. can me ?


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -