dbGet()

dbGet() can be used to retrieve data from the content database. For details and examples, see Using data fragments in PHP code and dbSet().

array|false dbGet(string key)

Important: dbGet() can only retrieve data that has been imported as a table or entered into the content database using dbSet(). The command cannot retrieve complex data structures that have been stored using dbStore(). Use dbRetrieve() for that.

Return value

If the specified key exists in the database, the function always returns an Array – even if only one value was stored for the key.

If the specified key is not found in the database, the function returns false. In debug mode (Start questionnaire in debug mode), but not in the finished questionnaire, a warning is also displayed if the key was not found.