SELECT .... FROM text t, text_to_stores tts where tts.key = t.text_key and t.status = 1 and tts.store_id = 101