sweeps78
10-05-2011, 06:03 PM
It's been a long time since I did some serious php and database work so bear with me:)
I have a product I'm working on that consists of a thread/post architecture. What I'm working on now is trying to figure out how to create a new ID for when inserting new records in the DB. Normally, I would think that I would just do a count on the records of that table and add 1 to create a new unique ID, but going through some other products people have created I see things like "$cleanfileid = $vbulletin->input->clean_gpc('r', 'id', TYPE_UINT);" being used a lot so I was curious if vBulletin already has a prebuilt function to generate new IDs.
I have a product I'm working on that consists of a thread/post architecture. What I'm working on now is trying to figure out how to create a new ID for when inserting new records in the DB. Normally, I would think that I would just do a count on the records of that table and add 1 to create a new unique ID, but going through some other products people have created I see things like "$cleanfileid = $vbulletin->input->clean_gpc('r', 'id', TYPE_UINT);" being used a lot so I was curious if vBulletin already has a prebuilt function to generate new IDs.