Ashley Sheridan;11003090 wrote:I think you meant you want the name field to use consecutive increments?
Why are you doing this? There's no default way to do this in MySQL (I'll make that assumption here as you didn't even say which DB you're using) . Explain a bit about why you want to do this, as someone will probably be able to offer a better way of doing what you need.
hi, thanks for your reply..
yes im using mySQL, the name field is not consecutive, they are just examples.
I want id to be unique to with the type field because i need to be able to select the row by $currentID +1
so for example the player already has id= 1, name= item1, type= head..
now i want to give them the next item with the type= head
so SELECT * FROM <table> WHERE id= $currentID +1 AND type=head
so to clarify my question, i am trying to find a way to insert the items in the 1st place.
As you say there is no default way to do this in mySQL i guess i need to just SELECT MAX(id) WHERE type=head
before i insert