Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#31 Fetched output reversed.

closed-wont-fix
nobody
None
5
2004-10-21
2004-10-21
Douglas Shawhan
No

Here is my simple script:

import time, gadfly ,kjbuckets, os, time

if not os.path.isfile('blogDB/blog.gfd'):
connection= gadfly.gadfly()
connection.startup('blog','blogDB')
c=connection.cursor()
c.execute("create table default (entryTime varchar,
entry varchar)")
connection.commit()

connection= gadfly.gadfly('blog','blogDB')
c=connection.cursor()

t=(time.time(), 'Happy Happy')

c.execute("insert into default(entryTime, entry)
values('%s','%s')"%t)
c.execute("select * from default order by entryTime desc")

for each in c.fetchall():
print each[0]
print each[1]
connection.commit()
-----------------------------

Machine 1 output:

1098333356.12
Happy Happy
1098333355.03
Happy Happy
1098333354.01
Happy Happy
1098333275.99
Happy Happy
1098333275.06
Happy Happy
1098333273.85
Happy Happy
1098333272.3
Happy Happy

Machine 2 output:

Happy Happy
1098333442.39
Happy Happy
1098333356.12
Happy Happy
1098333355.03
Happy Happy
1098333354.01
Happy Happy
1098333275.99
Happy Happy
1098333275.06
Happy Happy
1098333273.85
Happy Happy
1098333272.3

-------------

Both machines are OpenBSD.

machine1= OpenBSD 3.5 GENERIC#34 i386
machine 2 = OpenBSD 3.3 MERCURY#5 i386

Weird, man. The only real difference, other than the
versions, is that, since I don't have root permissions
on machine 2, I simply installed the gadfly directory
directly in cgi-bin.

Sorry if I am not asking the question intelligently!

Regards,

d

Discussion

  • Richard Jones
    Richard Jones
    2004-10-21

    • status: open --> closed-wont-fix
     
  • Richard Jones
    Richard Jones
    2004-10-21

    Logged In: YES
    user_id=6405

    Gadfly makes no promises about ordering of columns in a
    "select *" query. I couldn't say what is causing the change
    you're seeing.