php - Insert into mysql by incrementing a number by 3 -
i have mysql table store user's height. table looks this:
create table height ( id int auto_increment, feets_and_inches varchar(10) default null, centimeters int not null, primary key (id) ) engine=myisam default charset=utf8;
my question need insert centimeters table 91,94,97,100..... , upto 241
can know there way insert value using loop other doing manually.
hope may me out. thank you.
if operating in mysql, can create loop 91 241 like this:
delimiter $$ create procedure centimeterinsert() begin declare count int; declare max int; set count=91; set max= 241; while(count < max) -- run insert here, replace example select statement select count; set count=(count+3); end while; end $$ call centimeterinsert() $$
Comments
Post a Comment