本文整理汇总了PHP中Animal::set方法的典型用法代码示例。如果您正苦于以下问题:PHP Animal::set方法的具体用法?PHP Animal::set怎么用?PHP Animal::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Animal
的用法示例。
在下文中一共展示了Animal::set方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getListCountryCityCountryLanguage
function getListCountryCityCountryLanguage($condicion = null, $parametros = array())
{
if ($condicion === null) {
$condicion = "";
} else {
$condicion = "where {$condicion}";
}
$sql = " select co.*, ci.*, cl.*\r\n from country co\r\n left join city ci\r\n on co.Code = ci.CountryCode\r\n left join countrylanguage cl \r\n on co.Code = cl.CountryCode {$condicion}";
$this->bd->send($sql, $parametros);
$r = array();
$contador = 0;
while ($fila = $this->bd->getRow()) {
$country = new Cuidador();
$country->set($fila);
$city = new Animal();
$city->set($fila, 15);
//el numero es a partir del ultimo campo de country, para que coja los de city
//$countrylanguage = new CountryLanguage();
//$countrylanguage->set($fila, 20);
$r[$contador]["country"] = $country;
$r[$contador]["city"] = $city;
//$r[$contador]["countrylanguage"]=$countrylanguage;
$contador++;
}
return $r;
}
示例2: getList
function getList($pagina = 1, $orden = "", $nrpp = Constant::NRPP)
{
$ordenPredeterminado = "{$orden}, NombreAnimal, ZonaCode, IDAnimal";
if ($orden === "" || $orden === null) {
$ordenPredeterminado = "NombreAnimal, ZonaCode, IDAnimal";
}
$registroInicial = ($pagina - 1) * $nrpp;
$this->bd->select($this->tabla, "*", "1=1", array(), $ordenPredeterminado, "{$registroInicial}, {$nrpp}");
$r = array();
while ($fila = $this->bd->getRow()) {
$animal = new Animal();
$animal->set($fila);
$r[] = $animal;
}
return $r;
}
示例3: getListCountryCityCountryLanguage
function getListCountryCityCountryLanguage($condicion = null, $parametros = array())
{
if ($condicion === null) {
$condicion = "";
} else {
$condicion = "where {$condicion}";
}
$sql = " select co.*, ci.*, cl.*\r\n from country co\r\n left join city ci\r\n on co.Code = ci.CountryCode\r\n left join countrylanguage cl \r\n on co.Code = cl.CountryCode {$condicion}";
$this->bd->send($sql, $parametros);
$r = array();
while ($fila = $this->bd->getRow()) {
$country = new Cuidador();
$country->set($fila);
$city = new Animal();
$city->set($fila, 15);
$countrylanguage = new CountryLanguage();
$countrylanguage->set($fila, 20);
$r[] = new CountryCityCountryLanguage($country, $city, $countrylanguage);
}
return $r;
}