If I run the following query on psql:
SELECT nextval('redirect_link_id_seq');
it returns an integer, say 5
when I do the following with the django shell I get a different
result:
>>> def get_next_id():
... cursor = connection.cursor()
... cursor.execute("SELECT nextval('redirect_link_i
On Tue, 2008-09-30 at 15:08 -0700, Merrick wrote:
> If I run the following query on psql:
>
> SELECT nextval('redirect_link_id_seq');
>
> it returns an integer, say 5
>
> when I do the following with the django shell I get a different
> result:
>
> >>> def get_next_id():
> ... cursor = co
Thank you, I was doing this:
def encode_id(id):
...
number = id
charset = string.letters + string.digits
base = len(charset)
count = 0
while number:
digit = number % base
...
and kept getting an error, when I did this:
id = row[0]
encode_id(id)
I didn't realize
3 matches
Mail list logo