I'm passing the data into MySQL using Perl code.While passing the values dynamically, the values are not inserting in the database.Here is my DB connectivity code
#!C:\Perl\bin\perl.exe use strict; use warnings; use DBI; my $session_id = 723; print $session_id . "\n"; my $employeename='Anvi'; print("Employee name: $employeename\n"); my $dbh = DBI->connect("DBI:ODBC:DSN=databasename;uid=myusername;pwd=m +ypassword") or die $DBI::errstr; my $sth=$dbh->prepare("INSERT INTO employee_details (session_id,Name) +VALUES (?,?)"); $sth->execute; $dbh->disconnect; print "Done\n";
In reply to Perl with Insert query by Ekanvitha9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |