PySQLite Table indexing inside a functions

K

Kevin

Hello Everyone,

I'm using PySQLite and would like to index this insert
statement with the 'tablename'. Can anyone offer a
suggestion?

Also, this is a shot in the dark. Has anyone done
anything with nested fields. I would like each vertex
to have 3 points. currently, I'm just making 3
fields.

Regards,
Kevin



def PARSE2DB(data,tablename):
i = j = k = 0
cadu = GETdb().cursor()
FacetNum = len(data [1])
while i < FacetNum:
cadu.execute("""
insert into table = 'tablename'( V1_x, V1_y, V1_z,
V2_x, V2_y, V2_z,
V3_x, V3_y, V3_z, N_x, N_y, N_z)
values(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f,
%f, %f)
""",
(data [1][1][0][0], data [1][1][0][1],data
[1][1][0][2],
data [1][1][1][0], data [1][1][1][1],data
[1][1][1][2],
data [1][1][2][0], data
[1][1][2][1],data [1][1][2][2],
data [1][0][0], data
[1][0][1], data [1][0][2])
)
i = i + 1

return




__________________________________
Do you Yahoo!?
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top