Hello all,

I am using the MySQLdb module and I am writing to a MySQL database.

My write statement is something like.

cursor.execute(“INSERT INTO Data(Name, X, Y, Z, Data)

                       VALUES('%s', '%s', '%s', '%f', '%f', '%f', '%s')""" %

                                   (name, high_x, high_y, high_z, data))

 

I can write the data to a file as a check and all  variables are showing correctly. However when I extract the data from the database the X, Y are not coming out with the same number that “should be going” into the database but the Z is.  Any Ideas?

 

Example data going in and out.

IN.

Name = test

X = 34.523

Y = -123.2432

Z =  -123.2346

Data = "" is test data”

 

OUT

Name = test

X = 34.0

Y = -123.0

Z =  -123.2346

Data = "" is test data”

 

That’s is what is going in and coming out.

*Note this is an example of the data not actual data or code (Although the difference is the amount of data being input)”

 

Thanks for any and all help/comments.

 

Jeff

 

 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to