My main purpose is to insert and update new rows to a "html_text_field_texts" table more conveniently in phpMyAdmin.
I have a "html_text_field_texts" table with "htmlTextId, pageTypeId, pageId, localeId, htmlTextFieldId, htmlText" columns.
My first attempt was to create a "HTML Texts" view with the following SELECT statement:
Code:
SELECT
html_text_field_texts.htmlTextId
, page_types.pageTypeName
, pages.pageName
, locales.locale
, html_text_field_names.htmlTextFieldName
, html_text_field_texts.htmlText
FROM
html_text_field_texts
INNER JOIN
page_types
ON
page_types.pageTypeId = html_text_field_texts.pageTypeId
INNER JOIN
pages
ON
pages.pageId = html_text_field_texts.pageId
INNER JOIN
locales
ON
locales.localeId = html_text_field_texts.localeId
INNER JOIN
html_text_field_names
ON
html_text_field_names.htmlTextFieldId = html_text_field_texts.htmlTextFieldId
WHERE
locales.enabled = '1'
Now when I go to the INSERT form for the "HTML Texts" view in phpMyAdmin, the column types are the same as the selected columns from the original tables, e.g. "pageTypeName" is varchar(30) etc.
I want the VIEW to have ENUM type columns and set the ENUM values for e. g. the"pageTypeName" column of the VIEW from the UNIQUE values of "page_types.pageTypeName".
Thanks,
David