Get a Single Account By Name

Usage

Examples

$Account = $QB->getAccountByName("Accounts Payable");
echo $Account->Balance;

Parameters

  • $name – The desired account's Name. Must be exact match.

Returns

  • FALSE if account wasn't found.
  • Otherwise returns first row found in database as Database Object.

Source

public function getAccountByName($name)
{
	$this->DB->query("SELECT * FROM qb_account WHERE Name = '".$this->DB->prep($name)."';");
	return $this->DB->pop();
}
getaccountbyname.txt · Last modified: 2013/01/21 12:44 (external edit)