Home > database >  O zhuSQL query: how a one-to-many relationship paging through screening "multilateral" rec
O zhuSQL query: how a one-to-many relationship paging through screening "multilateral" rec

Time:10-30

Problems is that a video record, there will be multiple tags records, the screening of the main table if conditions paging, no problem, but now there is from table to table (tag) the label name of paging, don't know how to points, help each great god
Question: because a video record of the main table correspond to multiple label record from the table, when screening was carried out on the label name so paging again wrong number

CodePudding user response:

Or master record to appear more than once?
Screening can be judged by the exists label

CodePudding user response:

The
Hello World, 1/f, reference response:
or master record to appear more than once?
Screening can be judged by the exists if the tag

Master record appeared many times, I am now conditions screening from repeated record label or apple label of the master record of science and technology, so the right page

CodePudding user response:

The
Hello World, 1/f, reference response:
or master record to appear more than once?
Screening can be judged by the exists if the tag

If only to master record conditions screening, only to the main page, but now there is from the table to condition selection and paging, so we have a problem

CodePudding user response:

The
Hello World, 1/f, reference response:
or master record to appear more than once?
Screening can be judged by the exists if the tag

The master record for many times

CodePudding user response:

About like this:
Select * from the main table a
Where the exists (select 1 from label basic information table b inner joins the main table corresponding labels on c. c label ID=b.I D where c. the main table ID=Anderson D and b. label name='filters')
  • Related