Jump to main content Jump to doc navigation

xPDOObject::getFieldName()

Gets a field name as represented in the database container. This gets the name of the field, fully-qualified by either the object table name or a specified alias, and properly quoted.

Syntax

API Docs: http://api.modxcms.com/xpdo/om/xPDOObject.html#getFieldName

string getFieldName (string $k, [string $alias = null])

Examples

$document = $xpdo->getObject('Document',1);
echo $document->getFieldName('editedby');
// prints `documents`.`editedby`