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

    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: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
    Last edited by wajake41; 09-28-20, 07:35 AM.
    Larry
    Luce Kanun Web Design
    www.facebook.com/wajake41
    www.plus.google.com/116415026668025242914/posts?hl=en



    #2
    This is something I can help with. Message sent.

    Comment


      #3
      That sounds fun actually
      Colin Puttick
      Miva Web Developer @ Glendale Designs

      Comment


        #4
        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
        Larry
        Luce Kanun Web Design
        www.facebook.com/wajake41
        www.plus.google.com/116415026668025242914/posts?hl=en


        Comment

        Working...
        X