len wrote:
I have started a little pet project to learn python and MySQL. The
project involves figuring out all the combinations for a 5 number
lottery and storing the data in a MySQL file.
1. As someone else mentioned, the placeholder for MySQL data
is "%s", not "?".
2. After
len wrote:
> I have started a little pet project to learn python and MySQL. The
> project involves figuring out all the combinations for a 5 number
> lottery and storing the data in a MySQL file.
> import MySQLdb
> cursor.executemany('''insert into
> littlelottery
>
On Aug 19, 1:54 am, len <[EMAIL PROTECTED]> wrote:
> | lottryid | int(11) | NO | PRI | NULL|
> auto_increment |
> tupcnt += 1
> rectuple = tupcnt, thekey, a, b, c, d, e, mysum, 0
> listofrec.append(rectuple)
>
[EMAIL PROTECTED] wrote:
another thing - cumulative inserts will result, since
> listofrec is not emptied after each sql execution.
isn't that the point? -- he's building an argument array, and passing it
to executemany after it's reached a given size.
(to the OP, a quick code review doesn'
> -Original Message-
> From: Madari, Edwin
> Sent: Monday, August 18, 2008 3:03 PM
> To: 'len'; python-list@python.org
> Subject: Re: Newbie problem inserting into MySQL
>
> > -Original Message-
> > From:
> [EM
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> ython.org]
> On Behalf Of len
> Sent: Monday, August 18, 2008 11:55 AM
> To: python-list@python.org
> Subject: Newbie problem inserting into MySQL
>
>
> Hi All
>
> I hav
Hi All
I have started a little pet project to learn python and MySQL. The
project involves figuring out all the combinations for a 5 number
lottery and storing the data in a MySQL file.
The file looks like this;
+--+-+--+-+-
++
| Field