I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I have a table in my database with an auto-increment field, which is the primary key. What I'd like to know is how I can get this number after I insert a record into the table.
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Of course if all you really want is a unique value so that images don't collide, don't use the database at all. You can build your own in several different ways, System.currentTimeMillis() being one (evil) way.
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
lakshmi
If your only requirement is to give unique name to the uploaded image and you are not very particular about the sequence numer then the solution is very simple. Your product name is going to be a unique one. So rename the image file like productname_image.
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |