I'm trying to copy some channel data from the exp_channel_titles
table into Better Workflow's exp_ep_entry_drafts
table. I want to copy the data by matching the entry_ids, which already exist in both tables. So the status for entry ID 42 in exp_channel_titles
will go into the status column for entry ID 42 in exp_ep_entry_drafts
.
I'm very much a MySQL n00b, but here's what I came up with:
INSERT INTO
exp_ep_entry_drafts (
status,
url_title,
expiration_date,
entry_date
)
SELECT
titles.status,
titles.url_title,
titles.expiration_date,
titles.entry_date
FROM
exp_channel_titles titles
JOIN
exp_ep_entry_drafts
ON
titles.entry_id = exp_ep_entry_drafts.entry_id
When I run that in the EE query form, I get this error:
Fatal error: Call to a member function num_rows() on a non-object in /path/to/the/system/expressionengine/controllers/cp/tools_data.php on line 482