[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnump3d-users] Test the pre-release?
From: |
Stuffed Crust |
Subject: |
Re: [Gnump3d-users] Test the pre-release? |
Date: |
Thu, 16 Nov 2006 12:18:04 -0500 |
User-agent: |
Mutt/1.4.2.1i |
On Sun, Sep 03, 2006 at 02:49:17PM +0100, Steve Kemp wrote:
> OK how does this look?
>
> http://www.steve.org.uk/Software/tmp/gnump3d-3.0/bin/gnump3d-indexer
>
> [tarball in http://www.steve.org.uk/Software/tmp/]
A comment on the indexer:
#
# The ID of the previous insertion.
#
# If we used MySQL we could use: $CONFIG{'dbh'}->{mysql_insertid};
#
my $id = 0;
$sth = $CONFIG{'dbh'}->prepare( "SELECT id FROM files WHERE fname=?" );
$sth->execute( $file );
my @data = $sth->fetchrow_array();
$sth->finish();
$id = $data[0];
There's a generic '$dbh->last_insert_id()' call in modern DBI versions
that would work here; if it returns 'undef' we can use the above code as
a fallback.
- Solomon
--
Solomon Peachy pizza at shaftnet dot org
Melbourne, FL ^^ (mail/jabber/gtalk) ^^
Quidquid latine dictum sit, altum viditur. ICQ: 1318344
pgpOXBRU8Nfyt.pgp
Description: PGP signature
- Re: [Gnump3d-users] Test the pre-release?,
Stuffed Crust <=