Coaching & Coding

creating an excel file from a ODBC run SQL statement
updating woocommerce stock quantity via Rest API

Step 1: Create an ODBC Connection

create an ODBC Connection to your MSSQL Server,
beware there are two ODBC Configuration Managers
depending on your PHP Version (32bit or 64bit)

PHP Snippet that connects to ODBC and writes to Excel File article.xlsx
Loop through Excel Sheet and call Redt API with curl

you should now have an article.xlsx in the folder:

now the next step, where we loop through the excel file and update wooommerce

php/php.exe woo_sl_sync.php