= '$from' and `id` <= '$to' ;"); while ($us = mysql_fetch_array($u)) { print "a=$i"; $i=$us['id']; mysql_query("insert into `inventory` (name, duration, maxdur, cost, img, owner, magic, type, present, massa, otdel ) values ('Букет Подснежников','0','2','0','1marta_gift4.gif','".$i."','48','50','Администрация','1','6') ;"); } } ?>