Using the Quickbase PHP SDK for displaying data on the web

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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.
Photo of Lochlan Broughton

Lochlan Broughton

  • 224 Points 100 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
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...
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
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?