[Tutor] building a tuple
Darrell Brogdon
darrell@brogdon.net
Wed, 14 Feb 2001 23:48:59 -0500
Ok, so for example, I'm getting the following data:
Field Name Value
------------------------
fname John
lname Doe
address 123 Any St.
city Anytown
Now I know I can manually build a tuple out of this data with the following:
my_tuple {
"fname" : "John",
"lname" : "Doe",
"address" : "123 Any St."
"city" : "Anytown"
}
But obviously with this data coming from the database I wouldn't know what the values are. I've figured out how to get the data out of the
database for the most part. Now its just a matter of how to get that data into a tuple.
I think partly I'm confusing myself with my knowledge of PHP where you can pretty much get away with anything. :)
-Darrell
R. A. wrote:
> Can you provide a little more info? Info on tuples themselves may be
> found in all the standard tutorials. Do you have to interact with the
> database itself, or just with a data table?
>
> Rob
>
> Darrell Brogdon wrote:
>
>> I'm curious as to how to build a tuple out of data that I'm getting from a database result set. Can anyone point me in the right direction?
>>
>> Thanks
>>
>> --
>> Darrell Brogdon
>> http://darrell.brogdon.net
>>
>> _______________________________________________
>> Tutor maillist - Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>
--
Darrell Brogdon
http://darrell.brogdon.net