PySQLite Table indexing inside a functions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin

    #1

    PySQLite Table indexing inside a functions

    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,t ablename):
    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][i][1][0][0], data [1][i][1][0][1],data
    [1][i][1][0][2],
    data [1][i][1][1][0], data [1][i][1][1][1],data
    [1][i][1][1][2],
    data [1][i][1][2][0], data
    [1][i][1][2][1],data [1][i][1][2][2],
    data [1][i][0][0], data
    [1][i][0][1], data [1][i][0][2])
    )
    i = i + 1

    return




    _______________ _______________ ____
    Do you Yahoo!?
    All your favorites on one personal page – Try My Yahoo!
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!

Working...