All
I have a website written in Perl and operating out of cgi-bin. It has been up and running fine for the past 10 years. My site is an auction for commercial fishermen that allows them to buy and sell quota (fishery management). Sales data has been transferred into a MYSQL database.
This past weekend the folks that run the server told me that my version of Cpanel need to be updated, but the new version would not run on the server that I was on, so they would migrate me to another server. So I got migrated. The new server runs a newer version of PHP (version 7.X) and MYSQL.
And now I receive an error message when sales are attempting to be added to the database. The Error message occurs at the "execute" command.
Here is the relevant section of code:
##### prepare and execute query my $query = "INSERT INTO closedauctions (seller, sellerusername, categ +ory, title, bids, pounds, description, winningbid, price_per_pound, h +ighbidder, buyerusername, month, day, year, itemnum, filename) VALUES +(\"$sellername\",\"$sellerusername\",\"$quota\", \"$category\", 1, \" +$pounds\", \"$desc\", \"$buyit\", \"$price_per_pound\", \"$buyername\ +",\"$buyerusername\", \"$month\", \"$day\", \"$year\", \"$form{'ITEM' +}\", \"$cat\")"; my $sth = $dbh->prepare($query) || die "Could not prepare SQL statemen +t ... maybe invalid?"; $sth->execute() || die "Could not execute SQL statement ... maybe inva +lid?"; ##### disconnect from database $dbh->disconnect;
Is this old Perl and not compatible with the newer version of MYSQL?
All worked well prior to the migration.
Pete
In reply to Insert into mysql database by NorCal12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |