Re: [Tutor] database question

2007-06-29 Thread Alan Gauld
"Luke Jordan" <[EMAIL PROTECTED]> wrote > I've created a database as a shelve, where each value in the shelve > file is > a record class instance that has attributes representing fields. > Let's say I > enter 300 records in the shelve, then I decide to add a field to > future > records, or rem

[Tutor] database question

2007-06-29 Thread Luke Jordan
I've created a database as a shelve, where each value in the shelve file is a record class instance that has attributes representing fields. Let's say I enter 300 records in the shelve, then I decide to add a field to future records, or remove a field from future records. How can I update the exis

Re: [Tutor] database question

2006-10-27 Thread Alan Gauld
> For example > with "SELECT * FROM a", I use this code > > ... to know how many columns are in the result, As a general rule its better to avoid "Select * From" in production SQL. If the table definition changes the data returned can change in unexpected ways and break your application. In addi

[Tutor] database question

2006-10-27 Thread euoar
I'm learning to use python with the database mysql. I'm writing a widget in pygtk that should show the results of a sql query. For example with "SELECT * FROM a", I use this code count = 0 a = db.cursor.description for tuple in a: print tuple[0][0] count = count + 1