How can I select the next empty value when inserting into a database using PHP and SQL?

Kumori Kage

New member
For instance. i have a database table. this table has 31 rows in it. the first is owner which determines who "owns" the list. the rest are called "slot" followed by a number in order. "slot1" "slot2" all the the way to slot30.

what im trying to do is add to this table a value in the next empty slot.

i'm unsure how to achieve that however.
 
Normally as part of the design, you must:

First have some way of identifying an empty slot.
Next, you must have some way of "traversing" the list of slots. Once you see an empty slot, thats it.

End
 
Back
Top