Function DatabaseConnector->translate_field_ref

Definitions

sources/database.php

  • Convert a field name of type SHORT/LONG_TRANS[__COMCODE] into something we may use directly in our SQL.Assumes the query has separately been informed of the $lang_fields parameter (which is automatic for query_select).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$field_name ID_TEXT No No required parameter N/A N/A Language field name

Returns

  • SQL field name reference
  • Type: ID_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Convert a field name of type SHORT/LONG_TRANS[__COMCODE] into something we may use directly in our SQL.Assumes the query has separately been informed of the $lang_fields parameter (which is automatic for query_select).
 *
 * @param  ID_TEXT $field_name Language field name
 * @return ID_TEXT SQL field name reference
 */

public function translate_field_ref(string $field_name) : string