PHP MySQL Data Transfer Script

Job ID: 39530912

Budget: $10 – $30 USD

I need a PHP script that queries transaction records from a MySQL database and writes the results into another MySQL database on the same server.

Requirements:
- Use mysqli for database interaction
- Execute provided SQL query to fetch transaction records
- Write results directly into the second database using the provided SQL

Ideal Skills:
- Proficient in PHP and MySQL
- Experience with mysqli and SQL queries
- Familiarity with database operations and data transfer

Please review the attached SQL query for specifics.

For SQL connection, use these defaults:

server: 127.0.0.1
dbuser: pvm2025
dbpass: pvm2025
source_db: pvmsource
target_db: pvmtarget

For the target database, include SQL for its creation to accommodate data from the source database.

A development environment will NOT be provided. If you know PHP and MySQL, it should not be necessary.

Server Environment:
10.3.39-MariaDB-0+deb10u2 - Debian 10
Apache/2.4.59 (Debian)
PHP version: 7.3.33-19+0~20240606.119+debian10~1.gbp87e0d7

Result must be compatible with current environment, but also work on Debian 12 with PHP 8.x
Related categories: PHP Linux SQL Software Architecture MySQL