Announcement

Collapse
No announcement yet.

Need help converting mySQL calls in PHP to Miva API table query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • wajake41
    replied
    Actually this request for assistance is on hold for now as we are working with Miva Support for a possible solution provided by them.

    Thank you,
    Larry

    Leave a comment:


  • dreamingdigital
    replied
    That sounds fun actually

    Leave a comment:


  • Michael_Brock
    replied
    This is something I can help with. Message sent.

    Leave a comment:


  • Need help converting mySQL calls in PHP to Miva API table query

    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:[email protected]/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
    Last edited by wajake41; 09-28-20, 07:35 AM.
Working...
X