Using the Quickbase PHP SDK for displaying data on the web | Discussions

Expand all | Collapse all

Using the Quickbase PHP SDK for displaying data on the web

  • 1.  Using the Quickbase PHP SDK for displaying data on the web

    Posted 07-28-2017 06:46
    Hi!

    I am trying to use the QuickBase PHP SDK to lookup data and display it on a website for clients. I'm having some trouble setting it up. It seems that the data is returned is in an XML format, which I am unfamiliar with. I would just like to know how to get that data to a useable format that can be rendered in HTML. Ideally the data in the field will be all that is returned.

    Any help or a push in the right direction would be amazing.


  • 2.  RE: Using the Quickbase PHP SDK for displaying data on the web

    Posted 07-28-2017 14:29
    We use Javascript - not PHP so I can't help you with your original question, but if you use the API call API_GenResultsTable (link to documentation below) the data will come in html format (see the jht parameter).
    Neil

    link: https://help.quickbase.com/api-guide/index.html#gen_results_table.html%3FTocPath%3DQuick%2520Base%25...


  • 3.  RE: Using the Quickbase PHP SDK for displaying data on the web

    Bronze
    Contributor
    Posted 07-28-2017 14:40
    Not sure how you're getting the info but a typical jquery call I use is like this

    $.get(dbid, data, callback)

    then for callback it would be this instead
    $.get(dbid, data, function(xml){
    console.dirxml(xml) 
    $("SOME_FIELD_NAME", xml).each(function(){
    $(this).text()
    }
    })

    Ideally your query will only return one record but if it has more than that function will iterate through each record and display that fields value. Make sense?


  • 4.  RE: Using the Quickbase PHP SDK for displaying data on the web

     
    Posted 01-23-2019 16:24
    the SDK uses simple XML so you just need to know how to make a php call and work with the response.  let's say you have a do_query call

    let's say field 3 is the Name of a company. Assuming there is only one record.
    $result = $qbc->do_query($query,'','','','3.4.5.6');
    $name = $result->table->records->record->f[0] //Because fid 3 is the first in call above.
    echo $name;

    make sense