/** * mixed fetch(void) * * Fetches a row from the query result and populates an array object. * * @return array returns access log or false if no more logs to fetch * @access public * @since 0.4 */ function fetch() { $array = parent::fetchRow(); if ($array == false) { return false; } parent::_incrementRow(); $access = array(); $access["login"] = urldecode($array["login"]); $access["access_date"] = urldecode($array["access_date"]); $access["id_profile"] = intval($array["id_profile"]); return $access; }
/** * bool existName(string $firstName, string $surname1, string $surname2, int $idPatient = 0) * * Returns true if patient name already exists * * @param string $firstName * @param string $surname1 * @param string $surname2 * @param int $idPatient (optional) key of patient * @return boolean returns true if name already exists * @access public */ function existName($firstName, $surname1, $surname2, $idPatient = 0) { $sql = "SELECT COUNT(id_patient)"; $sql .= " FROM " . $this->_table; $sql .= " WHERE first_name='" . urlencode($firstName) . "'"; $sql .= " AND surname1='" . urlencode($surname1) . "'"; $sql .= " AND surname2='" . urlencode($surname2) . "'"; if ($idPatient) { $sql .= " AND id_patient<>" . intval($idPatient); } if (!$this->exec($sql)) { return false; } $array = parent::fetchRow(MYSQL_NUM); return $array[0] > 0; }
/** * mixed fetch(void) * * Fetches a row from the query result and populates an array object. * * @return array returns record log or false if no more logs to fetch * @access public * @since 0.4 */ function fetch() { $array = parent::fetchRow(); if ($array == false) { return false; } parent::_incrementRow(); $record = array(); $record["login"] = urldecode($array["login"]); $record["access_date"] = urldecode($array["access_date"]); $record["table_name"] = urldecode($array["table_name"]); $record["operation"] = urldecode($array["operation"]); $record["affected_row"] = urldecode($array["affected_row"]); return $record; }
/** * mixed fetch(void) * * Fetches a row from the query result and populates the Problem object. * * @return Problem returns user or false if no more problems to fetch * @access public */ function fetch() { $array = parent::fetchRow(); if ($array == false) { return false; } parent::_incrementRow(); $problem = new Problem(); foreach ($array as $key => $value) { $setProp = $this->_map[$key]['mutator']; if ($setProp && $value) { $problem->{$setProp}(urldecode($value)); } } return $problem; }