Skip to main content
Question

Using the Quickbase PHP SDK for displaying data on the web

  • July 28, 2017
  • 0 replies
  • 36 views

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.
This topic has been closed for replies.

  • Registered
  • July 28, 2017
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...

  • Registered
  • July 28, 2017
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?

  • Registered
  • January 23, 2019
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