MySQL Problem

Victor Subervi victorsubervi at gmail.com
Fri Sep 3 09:29:29 EDT 2010


This is an addendum to my last post. Please observe the following:

mysql> select * from spreadsheets where Temp=1;
+-----+--------------------+-------+---------+--------+------+
| ID  | Client             | Multi | Item    | Markup | Temp |
+-----+--------------------+-------+---------+--------+------+
| 611 | Lincoln_Properties |     0 | 2030572 |   0.00 |    1 |
| 621 | Lincoln_Properties |     0 | 2030572 |   0.00 |    1 |
+-----+--------------------+-------+---------+--------+------+
2 rows in set (0.00 sec)

mysql> describe spreadsheets;
+--------+------------------+------+-----+---------+----------------+
| Field  | Type             | Null | Key | Default | Extra          |
+--------+------------------+------+-----+---------+----------------+
| ID     | int(11) unsigned | NO   | PRI | NULL    | auto_increment |
| Client | varchar(40)      | YES  |     | NULL    |                |
| Multi  | tinyint(1)       | YES  |     | NULL    |                |
| Item   | varchar(40)      | YES  |     | NULL    |                |
| Markup | float(6,2)       | YES  |     | NULL    |                |
| Temp   | tinyint(1)       | YES  |     | NULL    |                |
+--------+------------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)

Yet from my script:

    cursor.execute('select * from spreadsheets where Temp=1')
    print cursor.fetchall()

print nothing but an empty set: () Why??
TIA,
beno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100903/7dc598a1/attachment.html>


More information about the Python-list mailing list