貸店舗・事務所・住居をさがす
こだわり条件で絞り込み
SELECT SQL_CALC_FOUND_ROWS
O.pk AS OPK,
O.address1,
O.address2,
O.line,
O.station,
O.access_bus_time,
O.point_lat,
O.point_lng,
R.pk,
R.menseki,
R.price,
R.shikikin,
R.shikikin_unit,
R.hosyoukin,
R.hosyoukin_unit,
R.reikin,
R.reikin_unit,
R.is_open,
R.icon_category1,
R.icon_category2,
R.icon_category3,
R.icon_category4,
R.icon_category5,
R.icon_category6,
R.icon_category7,
R.icon_category8,
R.icon_category9,
R.icon_category10,
R.icon_category11,
R.icon_category12,
R.icon_category13,
R.icon_category14,
R.icon_category15,
R.icon_category16,
R.icon_category17,
R.icon_category18,
R.icon_category19,
R.icon_category20,
R.icon_category21,
R.icon_category22,
R.icon_category23,
R.icon_category24,
P.table_type,
P.file_path,
P.file_name
FROM
`object2` O INNER JOIN `room2` R ON O.pk = R.object_pk LEFT JOIN m_picture P ON cast(O.pk AS CHAR character SET ujis) = P.table_pk AND (P.del_flg = 0 OR P.del_flg IS NULL) AND P.table_type IN('object2', 'room2') WHERE R.price > 0 AND R.menseki > 0 AND R.menseki IS NOT NULL AND R.genjo <> 4 AND R.is_open IN(1,2) AND (R.icon_category16=1) GROUP BY R.pk ORDER BY R.price, R.update_date DESC LIMIT ?, ?;