> Hey all...
>
> I am getting a numrows count of -1 when I print numrows (see line 23 of the
> code). What does "-1" mean?I think my connection is working and my
> table has data.
>
> Here's my code...
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
> import mysql.connector
> from mysql.connector import errorcode
>
> try:
> con = mysql.connector.connect(user='root', password='pw848596',
> host='127.0.0.1',
> database='mydb')
> except mysql.connector.Error as err:
> if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
> print("Something is wrong with your user name or password")
> elif err.errno == errorcode.ER_BAD_DB_ERROR:
> print("Database does not exists")
> else:
> print(err)
> else:
> cur=con.cursor()
>
> cur.execute("select Name from Rosters")
> numrows = cur.rowcount
> print numrows
> for x in xrange(0,numrows):
> row = cursor.fetchone()
> print "Name"
>
> con.close()
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/tutor/attachments/20131122/bf7c39de/attachment.html
> >
>
> --
>
> Subject: Digest Footer
>
> ___
> Tutor maillist - Tutor@python.org
> https://mail.python.org/mailman/listinfo/tutor
>
>
> --
>
> End of Tutor Digest, Vol 117, Issue 44
> **
>
--
Warm regards.
Satheesan Varier
860 (970) 2732
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
[1, 2, 3]
>
> In [4]: a[1]=0
>
> In [5]: a
> Out[5]: [1, 0, 3]
>
> In [6]: b
> Out[6]: [1, 0, 3]
>
> Is that not what you are seeing? If not perhaps you could show us how
> you are doing the list assignment and changing the list a, what output
> you are expecting
-------
>
> Message: 1
> Date: Sun, 17 Nov 2013 15:23:06 +
> From: Alan Gauld
> To: tutor@python.org
> Subject: [Tutor] Call Attribute error - Was Re: Tutor Digest, Vol
> 117,Issue 28
> Message-ID:
> Con
sDetails()
> determineMonthsTilSaved( goal, apr, deposit )
>
> months = determineMonthsTilSaved(goal, apr, deposit)
>
> summarize( months )
>
> def getSavingsDetails():
> """
> goal = float( input( "Principal sought? $" )