tags:

views:

38

answers:

1

Query:

SELECT t1.id,
       t1.ads_city,
       t1.ads_title,
       t1.ads_description,
       t1.ads_type,
       t2.ads_activate,
       t2.postads_id,
       t2.ads_id 
  FROM table_1 t1 
  JOIN nextpostads t2 ON t1.id = t2.postads_id
 WHERE MATCH(t1.ads_title,t1.ads_description) AGAINST ('LCD  projector ,' IN BOOLEAN MODE)  
   AND t2.ads_activate='Yes' 
   AND t1.ads_type='offering'

I have 2 record first record title is

" LCD projector,plasma display,recording speaker products"

and second record title is

" Interactive products(projection screen,projectors,touch panel,network camera)"

But from the above query I am not related result what is problem with it ?

+2  A: 

My guess is the t2.ads_activate value isn't "Yes" and/or the t1.ads_type value isn't "offering". Try:

SELECT t1.id,
       t1.ads_city,
       t1.ads_title,
       t1.ads_description,
       t1.ads_type,
       t2.ads_activate,
       t2.postads_id,
       t2.ads_id 
  FROM table_1 t1 
  JOIN nextpostads t2 ON t1.id = t2.postads_id
 WHERE MATCH(t1.ads_title,t1.ads_description) AGAINST ('LCD  projector ,' IN BOOLEAN MODE)

If the records you expect are returned, add the missing WHERE clauses , testing them one at a time. Otherwise, there's something with your JOIN...

OMG Ponies
thanks i got error point. you are right.
Ajay_kumar
OMG Ponies