Re: Last ID Problem
От | |
---|---|
Тема | Re: Last ID Problem |
Дата | |
Msg-id | 20050209163748.46506.qmail@web52409.mail.yahoo.com обсуждение исходный текст |
Ответ на | Re: Last ID Problem (<operationsengineer1@yahoo.com>) |
Ответы |
Re: Last ID Problem
|
Список | pgsql-novice |
> mitch and all, i noticed that if i keep refreshing > my > page that the $insert_id keeps growing... 66 then > 67 > then 68 then 69. > > i guess this makes sense, after all, the "next > value" > is always and icnrement higher. this makes me a > little nervous, though. > > i only want one value... the next id i should use > to > perform an insert. > > i'm hoping currval() does the trick, however, i'm > getting no result. > > do i need to instruct the sequence to go to it last > value before calling currval()? > > tia... another point of interest. now that i've been refreshing my nextval() statement, my highest cust_id value is 65, but nextval() keeps incrementing from where it was before. reading through the manual, this is designed in behavior. it looks like i could reset the value using setval(). i also noticed that currval() returns the value of the last nextval(). this infers that i must call nextval() prior to being able to get currval(), yet nextval() was not included in the original suggestion. am i missing something here? tia... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
В списке pgsql-novice по дате отправления: