1
2 개의 쿼리 결과가 교차하는 php-mysql 프레임 워크에서 mysql 쿼리를 실행하고 있습니다. 그러나 그것은 실행되지 않습니다. INTERSECT 조작의 구.을 변경해야 할 수도 있습니다. 실수는 어디 있는지 말해 줄 수 있어요?INTERECTECT NOT WORKING
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'intersect Select p.* from property p,property_type pt,location l,city c where p.' at line 1
당신이 날은 적절한 구문 것 알려 수 :
SELECT p.*
FROM property p
, property_type pt
, location l
, city c
WHERE p.STATUS = 1
AND p.prop_id = '1'
AND p.property_type = 'Sale'
AND (
pt.prop_name LIKE '%dlf%'
OR p.furnish LIKE '%dlf%'
OR p.description LIKE '%dlf%'
OR p.bed LIKE '%dlf%'
OR p.term_condition LIKE '%dlf%'
OR p.bedroom LIKE '%dlf%'
OR p.property_type LIKE '%dlf%'
OR c.city_name LIKE '%dlf%'
OR (
(
p.location_id = l.loct_id
AND l.loct_name LIKE '%dlf%'
)
)
)
AND p.prop_id = pt.prop_id
AND p.city = c.city_id
INTERSECT
SELECT p.*
FROM property p
, property_type pt
, location l
, city c
WHERE p.STATUS = 1
AND p.prop_id = '1'
AND p.property_type = 'Sale'
AND (
pt.prop_name LIKE '%sohna%'
OR p.furnish LIKE '%sohna%'
OR p.description LIKE '%sohna%'
OR p.bed LIKE '%sohna%'
OR p.term_condition LIKE '%sohna%'
OR p.bedroom LIKE '%sohna%'
OR p.property_type LIKE '%sohna%'
OR c.city_name LIKE '%sohna%'
OR (
(
p.location_id = l.loct_id
AND l.loct_name LIKE '%sohna%'
)
)
)
AND p.prop_id = pt.prop_id
AND p.city = c.city_id
ORDER BY sortnum LIMIT 0 , 30
그러나 그것은 오류를 보여주고있다?
mysql이 교차합니다. – AnandPhadke