Re: Problem with DBI and placeholders

2021-04-15 Thread mailing lists via beginners
, @row;     if ( ($#insert_rows % $#row ) == ($chunksize - 1) ){   $dst_sth->execute( @insert_rows );   undef @insert_rows;     };   }; [...] the @insert_rows array seems to consume inordinate amount of memory. Where can I be making the mistake?   On Saturday, April 10, 2021, 1

Re: Problem with DBI and placeholders

2021-04-09 Thread mailing lists via beginners
SELECT * FROM "test"; rather than  SELECT * FROM test; This isn't a problem for Postgres but MySQL doesn't accept quoted table names. On Fri, Apr 9, 2021 at 1:25 PM mailing lists via beginners wrote: I'm using: CentOS Linux release 7.9.2009 (Core) perl 5.16.3 perl-DBD

Re: Problem with DBI and placeholders

2021-04-09 Thread mailing lists via beginners
OM $table"); $sth->execute() && say "OK 2"; Em April 9, 2021 12:25:18 PM UTC, mailing lists via beginners escreveu: I'm using: CentOS Linux release 7.9.2009 (Core) perl 5.16.3 perl-DBD-MySQL-4.023 perl-DBI-1.627 On Friday, April 9, 2021, 2:19:13 PM GMT+2, mailing l

Re: Problem with DBI and placeholders

2021-04-09 Thread mailing lists via beginners
I'm using: CentOS Linux release 7.9.2009 (Core) perl 5.16.3 perl-DBD-MySQL-4.023 perl-DBI-1.627 On Friday, April 9, 2021, 2:19:13 PM GMT+2, mailing lists via beginners wrote: without using the variable $table it also fails with the same error $sth = $dbh->prepare("

Re: Problem with DBI and placeholders

2021-04-09 Thread mailing lists via beginners
without using the variable $table it also fails with the same error $sth = $dbh->prepare("SELECT * FROM ?");$sth->execute("test") && say "OK"; On Friday, April 9, 2021, 2:12:01 PM GMT+2, mailing lists via beginners wrote: thanks Andrew

Re: Problem with DBI and placeholders

2021-04-09 Thread mailing lists via beginners
e" is probably what you want. On Fri, Apr 9, 2021 at 12:49 PM mailing lists via beginners wrote: Hello, I am having a problem with a very simple task and I don't see where the fault is. The first query works with problem but the second one fails with this error:  ./test.pl OK 1 DBD::my

Problem with DBI and placeholders

2021-04-09 Thread mailing lists via beginners
Hello, I am having a problem with a very simple task and I don't see where the fault is. The first query works with problem but the second one fails with this error:  ./test.pl OK 1 DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your M

Re: Converting string to float

2017-03-02 Thread mailing lists via beginners
just to clarify, the real purpose of the script is output the hash to a json object, so the json output for the script: #!/usr/bin/perl use strict; use warnings; use Data::Dumper; use JSON::PP; my ($input_string, %job_task); sub sanitize_data{ my $data = shift; $data->{'work_hours'} = (split

Converting string to float

2017-03-02 Thread mailing lists via beginners
Helo all, what I am trying to do is convert a value contained whitin a hash from string to float, but I fail to find the error, this is that I have tried: $ cat test.pl #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my ($input_string, %job_task); sub sanitize_data{ my $data = sh