3

While I was looking into a related issue, I found the following scenario: Entry IDs in the exp_channel_data table do not match entry IDs in the exp_channel_titles table. I want to clean these up so there are no inconsistencies. Any suggestions as to how to clean this up?

7

Run this query in you SQL browser/tool/contraption of choice.

SELECT exp_channel_data.entry_id, exp_channel_titles.entry_id
FROM exp_channel_data
LEFT JOIN exp_channel_titles ON exp_channel_data.entry_id = exp_channel_titles.entry_id 
WHERE exp_channel_titles.entry_id IS NULL

This will give you a list of entries in your exp_channel_data table that don't have a title row. you can reverse the query to do the opposite.

0
1

Well, if you mean that there are some entries in the channel data table but not in the channel titles table, then you can probably delete them (make a backup first!) I've never seen this myself and cannot think of a scenario where this might occur so cannot give you a exact definitive answer i'm afraid.

But certainly try what i've suggested, see if it causes any issues and make sure you have that backup just in case!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.