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

Attachment: pgpfnRjSXFJre.pgp
Description: PGP signature

_______________________________________________
Gnump3d-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnump3d-users

Reply via email to