[PHP-DB] RE: [PHP] Re: ARRAY, IF & INSERT

2002-06-21 Thread César Aracena
Thanks for the input. I wasn't considering the possibility of making a new table for kids until now which seems pretty logic when trying to save space. The only thing missing now is how to assign a unique relation number for each kid/relative. That's 1 for the first born, 2 for the second one, etc

[PHP-DB] Re: [PHP] Re: ARRAY, IF & INSERT

2002-06-23 Thread Jesper Brunholm
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

[PHP-DB] RE: [PHP] Re: ARRAY, IF & INSERT

2002-06-24 Thread César Aracena
> 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"]"); > } [César L. Arac