I am trying to insert multiple rows into a postgresql table ..The SQL will 
look like this

insert into mytable(col1,col2) values(val1,val2),(val3,val4),(val5,val6) 

Since the web2py batching just iterates and executes each sql statement, I 
am trying to avoid multiple db calls by using executesql

I tried to do this using the following code

placeholderlist=[[val1,val2],[val3,val4],[val5,val6] ]
db.executesql(insert into mytable(col1,col2) values(%s,%s),placeholderlist])

But it does not work..Can somebody please help..



-- 

--- 
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