Fix SQL sintax error
Added user_id key relation in the php