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]

Reply via email to