On Mon, 2 Jun 2008 12:06:21 -0700 (PDT), Matimus <[EMAIL PROTECTED]>
wrote:
>Here is a brief example. Note that this code is very insecure and
>susceptible to a SQL injection attack. Hopefully these csv files are
>from a trusted source.
Yes they are, and this script will only run on my PC, so it doesn't
need to be more secure than this.
>sql = "INSERT INTO mytable (col1, col2) VALUES ('%s','%s')"%tuple(
> (c, "NULL")[c == ''] for c in m.groups()
> )
>
I don't understand this syntax :-/
>Also, check out the csv module for parsing your csv file.
Will do. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list