Answer the question
In order to leave comments, you need to log in
How to get multiple records from a Mysql table?
Good afternoon!
There is a form with a numeric field, which determines the price of services.
There is a database with a range of values for these fields - 32, 102, 152, etc.
The user enters, for example, 45
How to select rows with values 32 and 102 from mysql? Option
select * from table_name where param > 45 and param < 45
does not give the desired result (it is understandable). Answer the question
In order to leave comments, you need to log in
SELECT MAX(start_diameter) FROM table_name WHERE (start_diameter <= 145)
UNION ALL
SELECT MIN(start_diameter) FROM table_name WHERE (start_diameter >= 145)
"SELECT * FROM `table_name` WHERE param='32' OR param='102'" - Lists all rows with param where they are either 32 or 102
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question