If you're using a MySQL data base, define the column as
"autoincrement." This way, there's no time lag as you run two queries
(one to get max, another to insert the record).

If using some other data base engine, please specify which db (most will
have some means of doing what you need).

Mike


On 5/24/2007, "shaimaa mohamed" <[EMAIL PROTECTED]> wrote:

>dear all
>  i have a problem
>  i develop a site for file upload and sharing
>  and i want a suitable way to insert file in database
>  i use a technique of getting the max record inserted into db then increment 
> it by one then adding the new record..
>
>  if anyone find a better way ,please tell me
>  i'm afraid that there is simultaneous users upload files at the same time 
> ,so inserting records in db will be hulted..
>
>  thanks
>
>
>
>---------------------------------
>Luggage? GPS? Comic books?
>Check out fitting  gifts for grads at Yahoo! Search.
>
>[Non-text portions of this message have been removed]
>

Reply via email to