I have a program that needs to be converted from using MYSQL calls to a Miva database to employing Miva's API queries.
This is a code snippet as an example of a number of calls in the program needing conversion
<?php
$dsn = 'mysql://ProdQuery:product@deda271db/rvparksu_mm5';
$site = 'rvpark';
$last_order_date = 1601239412;
$SQL = "SELECT * FROM s01_Orders WHERE orderdate > '" . $last_order_date . "' ORDER BY orderdate ASC";
$result = mysql_query($SQL);
$num_rows = mysql_numrows($result);
if ($num_rows > 0) {
$Queue = new QuickBooks_WebConnector_Queue($dsn);
}
while($row = mysql_fetch_array( $result )) {
$order_no = $row['id'];
$Queue->enqueue(QUICKBOOKS_ADD_SALESORDER, $order_no, 10, $site);
}
?>
In addition to the Orders table, API queries in the same program are needed to: CFM_OrderValues, Customers, B2BNoTax, OrderPayments, OrderItems, CFM_ProdValues, OrderOptions, OrderCharges.
I imagine that the program will have to be modified to use some method (AJAX, ?) to call the Miva API but haven't a clue how that can be done.
That's why I need to have someone do that for us.
Thanks,
Larry
This is a code snippet as an example of a number of calls in the program needing conversion
<?php
$dsn = 'mysql://ProdQuery:product@deda271db/rvparksu_mm5';
$site = 'rvpark';
$last_order_date = 1601239412;
$SQL = "SELECT * FROM s01_Orders WHERE orderdate > '" . $last_order_date . "' ORDER BY orderdate ASC";
$result = mysql_query($SQL);
$num_rows = mysql_numrows($result);
if ($num_rows > 0) {
$Queue = new QuickBooks_WebConnector_Queue($dsn);
}
while($row = mysql_fetch_array( $result )) {
$order_no = $row['id'];
$Queue->enqueue(QUICKBOOKS_ADD_SALESORDER, $order_no, 10, $site);
}
?>
In addition to the Orders table, API queries in the same program are needed to: CFM_OrderValues, Customers, B2BNoTax, OrderPayments, OrderItems, CFM_ProdValues, OrderOptions, OrderCharges.
I imagine that the program will have to be modified to use some method (AJAX, ?) to call the Miva API but haven't a clue how that can be done.
That's why I need to have someone do that for us.
Thanks,
Larry
Comment