Mysql bulk insert. You have to put your code in a stored procedure.