public static function GetCountries($p_languageId = null, $p_code = null, $p_name = null, $p_sqlOptions = null)
{
if (is_null($p_sqlOptions)) {
$p_sqlOptions = array();
}
if (!isset($p_sqlOptions['ORDER BY'])) {
$p_sqlOptions['ORDER BY'] = array('Name', 'Code', 'IdLanguage');
}
$constraints = array();
if (!is_null($p_languageId)) {
$constraints[] = array('IdLanguage', (int) $p_languageId);
}
if (!is_null($p_code)) {
$constraints[] = array('Code', $p_code);
}
if (!is_null($p_name)) {
$constraints[] = array('Name', $p_name);
}
return DatabaseObject::Search('Country', $constraints, $p_sqlOptions);
}