Mailing list - Entries of 2006


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qftestJUI] Calculate with data from the database in a server script


  • Subject: [qftestJUI] Calculate with data from the database in a server script
  • From: Claudia M <spamknoedelkoenig@?.de>
  • Date: Thu, 9 Nov 2006 10:32:45 +0100 (CET)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=EWfmyPnQ109c0B4gVPlzdp54QqmbwZ41tT0uHlr/y0BxK46MkN45oSAhQDF95W5zk4naNJDSwTox8RxJA/EJ9RFguEh4BSEY+xCuizwlAXWn0D32zVXdRD1pFN9qte+wFSwU9HoackTIu+xlFt2WMjuAMP83fDBGpp4RrG56k70= ;

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 !

Regards, Claudia


NEU: Fragen stellen - Wissen, Meinungen und Erfahrungen teilen. Jetzt auf Yahoo! Clever.