Hello. There is a working request:
SELECT * FROM `realty_kvartiru` WHERE (dopolnitelnaya_infa LIKE 'Ленина' OR ulitsa LIKE 'Ленина' OR orientir LIKE 'Ленина') who searches for a keyword in one realty_kvartiru table in three columns, how can you modernize it, so that it can search for a fourth agenstvo_title field from the second table phones ?
The tables have the following structure:
realty_kvartiru : id , user_id , tip , tsena , rayon_id , ulitsa , orientir , etaj , etajnost , kolichestvo_komnat , nomer_doma , nomer_kvartiru , sostoyanie_tip , shema_tip material_tip commentary , own_type , is_exclusive , link , deleted_by , must_called , wanted_to_remove , notebook_comment , agents_realty
phones : id , phone , is_posrednik , agenstvo_title
select * from realty_kvartiru ... OR (id_записи_или_телефон_смотря_какая_у_вас_структура) in(select что-то from phones where agenstvo_title like 'xxx')- Mikeid``user_id``tip``tsena``rayon_id``ulitsa``orientir``etaj``etajnost``kolichestvo_komnat``nomer_doma``nomer_kvartiru``sostoyanie_tip``shema_tip``balcon_tip``sanuzel_tip``istochnik_id``material_tip``julaya_plowad``obwaya_plowad``kuhnya_plowad``dopolnitelnaya_infa``fio``nuzno_prodat``is_deleted``created_at``updated_at``is_imported``in_blacklist``in_deleted_list``deleted_at``secretary_id``call_status``commentary``own_type``is_exclusive``link``deleted_by``must_called``wanted_to_remove``notebook_comment``agents_realtyphones:id``phone``is_posrednik``agenstvo_title- ultimatum