Look at db.use_result() and db.store_result() here : http://www.birgerblixt.com/doc/packages/python-mysql/MySQLdb-2.html#ss2. 2
Best Regards -------------------- Mathias FATENE Hope that helps *This not an official mysql support answer -----Original Message----- From: Smelly Socks [mailto:[EMAIL PROTECTED] Sent: mardi 26 avril 2005 06:20 To: mysql@lists.mysql.com Subject: Re: Python related MySQL question Hi! I am porting a function library app I wrote in PHP to Python. At work they only use Python. I've researched how to connect to a MySql database using Python, and how to retrieve rows. However, I am wondering how to do the following: I can do this in Python => $da=MYSQL_QUERY("select * from prefs where user_name='$user_name' "); I can do this in Python => $peek=mysql_fetch_array($da); I cannot do the following: $title =$peek[4]; //title window $logic =$peek[5]; //logic window Can anyone shed light on how to get the pieces of the array and stick them into variables? Thanks very much! Cheers! -Warren ----- Original Message ----- From: "Spenser" <[EMAIL PROTECTED]> To: "David Bailey" <[EMAIL PROTECTED]> Cc: <mysql@lists.mysql.com> Sent: Thursday, April 14, 2005 12:27 PM Subject: Re: book advice > Check out "MySQL Tutorial" by Luke Welling (MySQL Press). It's easy > to understand and not overwhelming. > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]