0

I have custom channel named foo that is connected to the the members via safecracker and safecracker registration.

In a hook I am making, the member_id of a person is available to me.

Is there a way using SQL to get the entry_id in channel_data table based on the member_id that I have?

2
SELECT ct.entry_id 
FROM exp_channel_titles AS ct
LEFT JOIN exp_channel_data cd ON ct.entry_id = cd.entry_id 
WHERE ct.author_id = $member_id

Although you've requested the entry_id in your question, you don't actually need to include channel_data, as it's in channel_titles. But I've included above in case you want to pull all the entry data (so change SELECT ct.entry_id to SELECT *)

$member_id in the above would be variable you're searching on.

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.