[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qftestJUI] Calculate with data from the database in a server script
Hi All !
I have two questions, which may be very simple.
With the command "fetchall()" I get two rows from a database which looks like the following:
[(1.0, 0.0), (2.5, 100.0)]Question 1: How can I seperate these values and save each one in a variable like x, y, z, w ?
Question 2: The values are saved as a string. I need to do some calculation in order to compare the result with a value in the GUI. I need to do this:
if ((x*y + z*w) != 250.0)
rc.logError("uncorrect value !")
How can I convert the strings to double or float ?
Thanks for help !
NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.