Plugin Author
ka2
(@ka2)
I’m so sorry for not replying sooner.
Your sql query for creating table is likely mistake as syntax. It has occured the syntax error when I have directly tried your query on mysql client.
I think that you should modify to correctly sql query.
Thank you,
Hi ka2,
I corrected the syntax and created a table. However only one column shows correct data, but other columns show “NULL”. Any idea what is happening?
Thanks You,
Plugin Author
ka2
(@ka2)
Hi there,
Please show me the “CREATE TABLE” statement of table that created correctly, if I may.
Thank you in advance.
Hi ka2,
The following statement created a table, but only the ‘id’ and ‘cpd_area’ columns show correct values; other columns show ‘NULL’ value.
CREATE TABLE wp_testing1
SELECT entry_id,
CASE
WHEN slug=’profession’ THEN value
ELSE NULL
END AS profession,
CASE
WHEN slug=’cpd_name’ THEN value
ELSE NULL
END AS cpd_name,
CASE
WHEN slug=’cpd_year’ THEN value
ELSE NULL
END AS cpd_year,
CASE
WHEN slug=’cpd_area’ THEN value
ELSE NULL
END AS cpd_area,
CASE
WHEN slug=’cpd_units’ THEN value
ELSE NULL
END AS cpd_units,
CASE
WHEN slug=’note’ THEN value
ELSE NULL
END AS note
FROM wp_cf_form_entry_values
GROUP BY entry_id;
Plugin Author
ka2
(@ka2)
Thank you for providing.
Well, the CREATE TABLE query has worked correctly.
Therefore, if it does not exist data that matching string as like “profession” in slug column on your “wp_cf_form_entry_values” table, such columns will have null after creating table.
What data have in your “wp_cf_form_entry_values” table?
Also, how do you want to create table and have data?
Please tell me if you like.