Skip to content

Instantly share code, notes, and snippets.

@jbartek
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbartek/11047386 to your computer and use it in GitHub Desktop.
Save jbartek/11047386 to your computer and use it in GitHub Desktop.
SugarQuery - Select Accounts with account_type = 'Industry'
<?php
$query = new SugarQuery();
$query->select(array('id','name'));
$query->from(BeanFactory::getBean('Accounts'));
$query->where()->equals('industry','Media');
$results = $query->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment