Joshua's Thoughts

quickbase php api examples

Tags: , , , , ,

i’ve had a few requests for examples of how to use the quickbase php api wrapper. so here goes:

setup the quickbase object with login info

include the library and setup the object by passing in username, password, true/false (xml/http), and dbID of the db/table you’ll be transacting with.

include_once('../includes/qb.php');
$quickbase = new QuickBase('username','password', true, 'dbID');

do a quickbase query

here, we setup a query to return field 3 where (field id 15 is equal to somevalue).

$queries = array(
			array(
				'fid'	=> '15',
				'ev'	=> 'ex',
				'cri'	=> 'somevalue')
			 );

$results = $quickbase->do_query($queries, '', '', '3');

adding a record to a quickbase

this one is super easy. create an associative array with field id’s and values and then use the add_record method.

$fields = array(
			array(
				'fid'	=> '1',
				'value'	=> 'some value'),
			array(
				'fid'	=> '2',
				'value'	=> 'some value'),
			array(
				'fid'	=> '3',
'value'=>'some value')
						  );
$quickbase->add_record($fields);

edit a quickbase record

almost identical to add_record, setup the array and use the add_record method.

$fields = array(
			array(
				'fid'	=> '1',
				'value'	=> 'some value'),
			array(
				'fid'	=> '2',
				'value'	=> 'some value'),
			array(
				'fid'	=> '3',
'value'=>'some value')
						  );
$quickbase->edit_record($fields);

do a quickbase query

here, we setup a query to return field 3 where (field id 15 is equal to somevalue).

$queries = array(
			array(
				'fid'	=> '15',
				'ev'	=> 'ex',
				'cri'	=> 'somevalue')
			 );

$results = $quickbase->do_query($queries, '', '', '5');

webex api php wrapper

Tags: , , , , , ,

i did some work this week with integrating webex into the quickbase website. as a result, i ended up putting together a wrapper for the webex xml api in order to speed up development time.

if you’re going to be using webex with php, check it out.

it doesn’t have full support for all api methods (yet), but if there’s enough interest, perhaps i’ll keep building on it in my “spare” (ha) time.

basic examples of usage here: http://blog.joshuamcginnis.com/2009/04/quickbase-php-api-examples/

php api wrapper (sdk) for quickbase

Tags: , ,

For anyone interested in using PHP with QuickBase, here is a PHP wrapper. It uses cURL to post XML and HTTP POSTS to QuickBase. Big thanks to Alex Wilson for providing most of the original code base. The documentation for the QuickBase API can be found here.

Read on…