Simon,

We use the Perl DBD module all the time. What I would expect to see is (IGNORE THE LINE BREAKS)

    my $sth = $dbh->prepare("INSERT INTO
        func_begin_change(
            author,
            author_contact,
            author_contact_method,
            author_shortname,
            id,
            lang,
            mtime,
            mtimetz,
            parent_id
        )
    VALUES
        (
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?
        )");

followed by

        $sth->execute('Mark Lawrence',
              'em...@address.net',
              'email',
              'ML',
              13,
              'en',
              '1478010282201',
              3600000,
              undef);

The prepare sets the statement up and the execute fills the variables in.

Now Mark has probably printed out using Dumper an array in Perl with the variables. Thats shown by the use of $VAR1. Anybody who uses Perl uses Dumper and is very familiar with the output format :)

Here's what the Perl array could/would/should look like

['Mark Lawrence','em...@address.net','email','ML',13,'en','1478010282201',3600000,undef]

Now he could call $sth->execute_array(\%attar) rather than $sth->execute(var1 , var2....) see http://search.cpan.org/~timb/DBI-1.636/DBI.pm#execute

We've just checked our Perl libraries and we have never used $sth->execute_array as we prefer to be very specific about what we pass in.

It would be useful to see the actual Perl itself rather than the abstraction in the email. I can't comment on BSD as we don't use it BSD at all, but the coding pattern in Perl is pretty standard and very, very common. I'd be surprised if this is a problem but you never know.

Rob


On 1 Nov 2016, at 14:57, Simon Slavin wrote:


On 1 Nov 2016, at 2:38pm, mark <no...@null.net> wrote:

   VALUES
       (
           ?,
           ?,
           ?,
           ?,
           ?,
           ?,
           ?,
           ?,
           ?
       )
   ;

At least that is what I am passing to Perl's DBD::SQLite prepare()
method. I am then binding the following values before running execute:

   $VAR1 = [
             'Mark Lawrence',
             'em...@address.net',
             'email',
             'ML',
             13,
             'en',
             '1478010282201',
             3600000,
             undef
           ];

Excuse me. I don't know Perl, or how it uses its DBD module. Are you binding each of those values (e.g. 'ML') separately, or are you binding the whole of $VAR1 as one operation ?

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to