Function DatabaseDriver->add_table_field__sql

Definitions

sources/database.php

  • Get SQL for adding a field to an existing table.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: string

Parameters

Name Type Default Set Range Description
$table_name ID_TEXT required parameter N/A N/A The table name
$name ID_TEXT required parameter N/A N/A The field name
$type ID_TEXT required parameter N/A N/A The field type
$default ?mixed required parameter N/A N/A The default value; for a translatable field should still be a string value (null: null default)

Return

  • SQL query to run
  • Type: string
  • Set: N/A
  • Range: N/A