[[dbGet()]]
Translations of this page:
 

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)

  • key
    The database key for which data has been stored.

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.

en/create/functions/dbget.txt · Last modified: 05.09.2023 11:37 by swissel.uni-mannheim
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki