Help, pliz. :)

The situation is this: from the database I want to display all the entries under the value, for example, 6, this value can be stored in several DIFFERENT fields. So make a request?

http://rghost.ru/8gqG2PNYF.view

  • @lidovsci, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky

2 answers 2

SELECT * FROM table WHERE row1=6 and row2=6 and ... rowN=6; 

list all the required fields.

or

 SELECT * WHERE MATCH (text) AGAINST ('$find') 
  • The problem is that in the first field, if there is no record, then he does not look for the rest anymore. - Gennady
  • put OR !, and not AND. After a bit, you need to think a little bit, turn on the concept. - Artem
  • Your method doesn't work - Gennady
  • unreasonably somehow ... - Artem
  • he displays everything in a row, except for these records, but he doesn’t display them - Gennady
 SELECT * FROM `table` WHERE 6 in(`row1`,`row2`,`rowN`);