Tables:
helps (important are id and fecha fields)

shared helps (helps referenced by other users with a different date)

So,
All helps from a user (user_id = 1)
SELECT * FROM helps WHERE id_user = 1
All helps from user and the ones he refferenced
SELECT * FROM helps where id_user = 1 or id IN (SELECT helpid FROM shared_helps WHERE userid = 1)
I know you guys will find it a very ugly query (I hoped you could show me the light) but it seems to show the results I want. Problem is that this way shared_helps.fecha is ignored so it makes no effect in the ORDER BY, how can I achieve this?
EDIT
Based on your comment, try this…
Or possibly this…
I’m honestly not 100% certain what you need. Perhaps you could include some sample data and the output you desire for that sampel data?