MySQL insert query problem

Lol McBride newspost at lolmc.com
Sun Jan 25 17:28:30 EST 2004


Hi all,
I'm using Python 2.3 and the MySQLDB module on a Mandrake Linux 9.2 system
and I'm encountering a problem whentrying to insert a string object intoa
varchar field in a database I'm using. The query being sent to the MySQL
server  by my program is : INSERT INTO analysis (DrawNumber,pool1)VALUES
(847, ' (4, 8, 21, 24, 39, 44) ' ) ;

But the field pool1 actually contains  (4, 8, 21, 24, 39, i.e it is
missing the final digits ( 44 ) and the closing bracket.The program writes
a number of rows into the database and they all exhibit the same behaviour
- could anyone shed some light on this problem? Thanks,
Lol McBride



More information about the Python-list mailing list