Database Functions

These functions help you connect to databases and run SQL queries.

Calling Database Functions

You can use syntax of the form:

functionName()

to call these functions in your PHP code.

checkRowExists()

Name in Zenario 8

ze\row::exists()

Checks whether a given row in a given table exists in the database.

connectGlobalDB()

Name in Zenario 8

ze\db::connectGlobal()

Connects to the global database, so you may query any global tables.

connectLocalDB()

Name in Zenario 8

ze\db::connectLocal()

Connects to the local database if you are not already connected, so you may query any local tables.

deleteRow()

Name in Zenario 8

ze\row::delete()

Deletes a row from a table in the database.

If page caching is in use on a site, the cache will be cleared depending on the tables or rows affected.

Format of $id and $values for Database Functions

The database functions share two common parameters.