---
title: "db:get — Get object (ZeyOS)"
description: "iXML command db:get: Get object (ZeyOS)."
canonical_url: "https://www.zeyos.com/ixml/ref/db-get"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/db-get.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# db:get — Get object (ZeyOS)

DB:GET gets a database object, specified by entity and ID.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |
| var_fields | var |  | Variable name for field list |
| var_extdata | var |  | Variable name for associated extdata field name and value pairs |
| var_tags | var |  | Variable name for tag names |
| entity | string |  | Entity |
| id | int |  | ID |

### Children
- (none)

### Parents
- db:connection

### Result
- binding: var; type: array; predicate: no-result-propagation

### Examples

```xml
<db:get var="obj" entity="contacts" id="123"/>
<output>$obj.firstname $obj.lastname</output>
<!-- Bill Gates -->
```

```xml
<db:get var="obj" entity="contacts" id="123">
	<db:field>lastname</db:field>
</db:get>

<if value1="$obj.lastname" func="=" value2="Gates">
	<set var="obj.lastname">Jobs</set>
	<set var="obj.firstname">Steve</set>
</if>

<db:set entity="contacts" id="123" var_data="obj"/>
```
