Mysql Union repeating results -


I have a selection of the following, but it repeats the results of the second inner selection 3 times.

Can anyone tell me why this is

Besides, when I get results, how will I know when the result comes from a table? Home_content or facilities_table Choose from

  select (from hm_id, hm_name, hm_summary, match (hm_name, hm_summary) ('test') as a score from home_content where match (hm_name, hm_summary) Against the score (fac_title, fac_summary) ('test')) against the UNION selection fac_id, fac_name, fac_summary, match (fac_title, fac_summary) match (as opposed to 'test_') (score from facilities_table) DESC < / Code against a command>  

Thank you in advance

can not see it Why are you getting duplicates? Query:

  1. There are no duplicates in the source table
  2. The same data appears in home_content and facilties_table

    The second part of the question reads easily to decide which table comes from the union's content, that by adding a continuous column for every question of union, you get something like this: / P>

      SELECT * ('test') union selection 2, FAP_ID, FAP_NA , Against FAP_sUMRI, FAP (AMMANA, HM_samuri) against a command SCORE DSC  FOP_title, FAP_smurry) The initial column should be 1 for Home_ content table and 2 for the Facilities_ table. Clearly, string constants can be used in the same style, if you are better suited. 


Comments

Popular posts from this blog

php - multilevel menu with multilevel array -

c# - TypeConverter in propertygrid only converts from string, not to -

jQuery UI: Datepicker month format -