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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -