Mike P wrote:
That is a nice piece of code,
I cracked the idea of the shift; problem, my final problem is still
how to convert
my @row = $sth->fetchrow_array;
$$StartDate = $row[0];
$$EndDate = $row[1];
$sth->finish()
into python code as i'm not sure what $$ means
according to a
Jeroen Ruigrok van der Werven wrote:
cursor=db.cursor()
cursor.execute(sql)
while (1):
row = cursor.fetchone()
if row == None:
break
combined = ', '.join(row)
Why not something like:
for row in cursor.fetchall():
combined = ', '.join(row)
which ca
That is a nice piece of code,
I cracked the idea of the shift; problem, my final problem is still
how to convert
my @row = $sth->fetchrow_array;
$$StartDate = $row[0];
$$EndDate = $row[1];
$sth->finish()
into python code as i'm not sure what $$ means
Any help on this final part woul
-On [20080812 15:16], Daniel Mahoney ([EMAIL PROTECTED]) wrote:
>cursor=db.cursor()
>cursor.execute(sql)
>while (1):
> row = cursor.fetchone()
> if row == None:
> break
> combined = ', '.join(row)
Why not something like:
for row in cursor.fetchall():
combined =
Thanks for that Daniel,
I've been able to apply the logic to the rest of the script i'm
converting.
There are only two bits that i don't understand in the Perl script
that i need to convert,
my $sql = shift;
and
my @row = $sth->fetchrow_array;
$$StartDate = $row[0];
$$EndDate = $row[1]
On Tue, 12 Aug 2008 05:51:19 -0700, Mike P wrote:
> Hi All,
>
> I've been given a Perl script that i'm trying to convert into python.
> The aim of the script links to MqSQL database, but i'm stuck on one
> part
>
>my $sth = $dbh->prepare($sql)||
>die "Could not prepare SQL statement
Hi All,
I've been given a Perl script that i'm trying to convert into python.
The aim of the script links to MqSQL database, but i'm stuck on one
part
my $sth = $dbh->prepare($sql)||
die "Could not prepare SQL statement ... maybe invalid?:$!\n$sql
\n";
$sth->execute()||
die "C