Hi, sorry for my bad english.

I've a table where i store the result of a quality test.
If the test is passed then the result=ok and connect=0
If test fail then result=nok and, if it's the first test for the
product, connect=0
When i retest a failed product i've  connect= previous testid of the
product failed
It's possible to do a query for print the history of one id?? 

Exemple 

mysql> select * from mytable;

+---------------------+----------+----------+
| testId              | connect  | result   | 
+---------------------+----------+----------+
| 1                   | 0        | ok       |
| 2                   | 0        | nok      |
| 3                   | 2        | nok      |
| 4                   | 3        | nok      |
| 5                   | 0        | ok       |
| 6                   | 4        | nok      |
| 7                   | 6        | ok       |
| 8                   | 0        | ok      |
+---------------------+----------+----------+


I want the history of  testId=7
mysql>  ??????

+---------------------+----------+----------+
| testId              | connect  | result   | 
+---------------------+----------+----------+
| 7                   | 6        | ok       |
| 6                   | 4        | nok      |
| 4                   | 3        | nok      |
| 3                   | 2        | nok      |
| 2                   | 0        | ok       |
+---------------------+----------+----------+


Thanks a lot!

Max (trashman)



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to