Zum Hauptinhalt springen

Lookup object (ZeyOS)

XML
<db:lookup var="var" entity="string">
ixml
</db:lookup>

Parents: db:connection

<db:lookup /> looks up a database object and returns it's ID if applicable.

Attributes

NameTypeDescriptionDefined By
varvarResult variable name db:lookup
entitystringEntity db:lookup

Results

BindingTypePredicate
varN/A

Examples

XML
<db:lookup entity="contacts" var="id">
<db:is field="lastname">Gates</db:is>
<db:is field="firstname">Bill</db:is>
</db:lookup>

<if value1="$id" func="=" value2="">
<output>Contact not found!</output>
</if>

<!-- Contact not found! -->