............................................________ 
....................................,.-'"...................``~., 
.............................,.-"..................................."-., 
.........................,/...............................................":, 
.....................,?......................................................, 
.................../...........................................................,}
 
................./......................................................,:`^`..}
 
.............../...................................................,:"........./
 
..............?.....__.........................................:`.........../ 
............./__.(....."~-,_..............................,:`........../ 
.........../(_...."~,_........"~,_....................,:`........_/ 
..........{.._$;_......"=,_......."-,_.......,.-~-,},.~";/....} 
...........((.....*~_......."=-._......";,,./`..../"............../ 
...,,,___.`~,......"~.,....................`.....}............../ 
............(....`=-,,.......`........................(......;_,,-" 
............/.`~,......`-...................................../ 
.............`~.*-,.....................................|,./.....,__ 
,,_..........}.>-._...................................|..............`=~-, 
.....`=~-,__......`,................................. 
...................`=~-,,.,............................... 
................................`:,,...........................`..............__
 
.....................................`=-,...................,%`>--==`` 
........................................_..........._,-%.......` 
..................................., 

On Sunday, August 4, 2013 3:27:36 PM UTC-4, Anthony wrote:
>
> (actually would've just put the .nine into the select and save a line)
>>
>
> That wouldn't save a line -- still have to specify the field even if the 
> row contains only one field. 
>
>>
>> BUT what if my field name is a variable like so?
>>     row = db((db.squares.game_code==session.game_code) & 
>> (db.squares.row_num==row_vis)).select()
>>     winner= row[0].[winning_col]
>> (I also tried the winning_col in () and '')
>>
>
> A Row object works like a dictionary, so:
>
> row[0][winning_col]
>
> Mentioned near the end of this 
> section<http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#select>in
>  the book.
>
> Anthony
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to