I have the following code in tcl ..
proc GetPPVSummary {} {
global LIBRARY DB_MACHINE ALT_MACHINE
set query "SELECT first 2 * from test ORDER by ppv_id DESC"
set result [mtlrequest $LIBRARY DbSelect "test@$ALT_MACHINE|$query"]
return $result
}
set return_data [GetPPVSummary]
puts $return_data
the above returns something like this:
{{753 38 {2000-04-10 00:00:00} {2000-04-11 00:00:00} 3 HQAWR 56897 PPV B Event_04292012_teaser {} Event_04292012_teaser The_World_Doesnt_Care {$99.00} {$0.01}}
How do I print only the values one by one in tcl?
ok so i tried the following now:
foreach record $return_data {
set event_date [lindex $record 1]
set attempts_cnt [lindex $record 2]
set success_cnt [lindex $record 3]
set fail_cnt [lindex $record 4]
}
puts $event_date
Now, i get the whole full row instead of the first or second value..
Assuming $return_data is a list of lists, you want