César aracena wrote: > The catch would be to make PHP to auto assign the relatives "level" by > knowing it has to start from $i=1 and loop $i++ until no other kid is > inserted. Now that I write it, it seems I could use a for loop, but what > should be the structure of it using the $name <> 0 you told me?
the name <> 0 was a sql-query - it will return a ressource which will enable you to make something like $i=0; while($row = mysql_fetch_assoc($nameless_result){ #psuedo-code# # mysql_query=("insert into table set relativenumber = 'jr$i' where ID=$row["ID"]"); } regards Jesper Brunholm btw: please do not write to my private email -- Phønix - Danish folk music from young musicians - http://www.phonixfolk.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php